mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
closes #2581
This commit is contained in:
@@ -13,6 +13,7 @@ var topicsController = {},
|
||||
privileges = require('../privileges'),
|
||||
plugins = require('../plugins'),
|
||||
helpers = require('./helpers'),
|
||||
pagination = require('../pagination'),
|
||||
utils = require('../../public/src/utils');
|
||||
|
||||
topicsController.get = function(req, res, next) {
|
||||
@@ -257,16 +258,11 @@ topicsController.get = function(req, res, next) {
|
||||
|
||||
topics.increaseViewCount(tid);
|
||||
|
||||
if (!res.locals.isAPI) {
|
||||
// Paginator for noscript
|
||||
data.pages = [];
|
||||
for(var x=1; x<=data.pageCount; x++) {
|
||||
data.pages.push({
|
||||
page: x,
|
||||
active: x === parseInt(page, 10)
|
||||
});
|
||||
}
|
||||
}
|
||||
pagination.create(data.currentPage, data.pageCount, data);
|
||||
|
||||
data.pagination.rel.forEach(function(rel) {
|
||||
res.locals.linkTags.push(rel);
|
||||
});
|
||||
|
||||
res.render('topic', data);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user