mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 06:55:46 +01:00
changed numRecentTopics to numRecentReplies, that makes more sense now
This commit is contained in:
@@ -85,8 +85,8 @@
|
||||
</div>
|
||||
<div class="col-sm-4 col-xs-12">
|
||||
<div class="form-group">
|
||||
<label for="cid-{categories.cid}-numRecentTopics"># of Recent Topics Displayed</label>
|
||||
<input id="cid-{categories.cid}-numRecentTopics" type="text" class="form-control" placeholder="2" data-name="numRecentTopics" value="{categories.numRecentTopics}" />
|
||||
<label for="cid-{categories.cid}-numRecentReplies"># of Recent Replies Displayed</label>
|
||||
<input id="cid-{categories.cid}-numRecentReplies" type="text" class="form-control" placeholder="2" data-name="numRecentReplies" value="{categories.numRecentReplies}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -55,7 +55,7 @@ var path = require('path'),
|
||||
});
|
||||
|
||||
function iterator(category, callback) {
|
||||
categories.getRecentReplies(category.cid, parseInt(category.numRecentTopics, 10), function (err, posts) {
|
||||
categories.getRecentReplies(category.cid, parseInt(category.numRecentReplies, 10), function (err, posts) {
|
||||
category.posts = posts;
|
||||
category.post_count = posts.length > 2 ? 2 : posts.length; // this was a hack to make metro work back in the day, post_count should just = length
|
||||
callback(null);
|
||||
|
||||
@@ -145,14 +145,14 @@ Upgrade.upgrade = function(callback) {
|
||||
}
|
||||
|
||||
for (var cid in cids) {
|
||||
db.setObjectField('category:' + cids[cid], 'numRecentTopics', '2');
|
||||
db.setObjectField('category:' + cids[cid], 'numRecentReplies', '2');
|
||||
}
|
||||
|
||||
winston.info('[2013/12/31] Added categories.numRecentTopics fields');
|
||||
winston.info('[2013/12/31] Added categories.numRecentReplies fields');
|
||||
next();
|
||||
});
|
||||
} else {
|
||||
winston.info('[2014/1/3] categories.numRecentTopics fields skipped');
|
||||
winston.info('[2014/1/3] categories.numRecentReplies fields skipped');
|
||||
next();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user