v1.18.x
barisusakli 10 years ago
parent 03b0d282f1
commit 47a2377229

@ -159,7 +159,7 @@ categoriesController.list = function(req, res, next) {
categoriesController.get = function(req, res, next) { categoriesController.get = function(req, res, next) {
var cid = req.params.category_id, var cid = req.params.category_id,
page = req.query.page || 1, page = parseInt(req.query.page, 10) || 1,
userPrivileges; userPrivileges;
if (req.params.topic_index && !utils.isNumber(req.params.topic_index)) { if (req.params.topic_index && !utils.isNumber(req.params.topic_index)) {

@ -18,7 +18,6 @@ var topicsController = {},
topicsController.get = function(req, res, next) { topicsController.get = function(req, res, next) {
var tid = req.params.topic_id, var tid = req.params.topic_id,
page = 1,
sort = req.query.sort, sort = req.query.sort,
userPrivileges; userPrivileges;
@ -82,7 +81,7 @@ topicsController.get = function(req, res, next) {
} }
var postIndex = 0; var postIndex = 0;
page = parseInt(req.query.page, 10) || 1; var page = parseInt(req.query.page, 10) || 1;
req.params.post_index = parseInt(req.params.post_index, 10) || 0; req.params.post_index = parseInt(req.params.post_index, 10) || 0;
if (reverse && req.params.post_index === 1) { if (reverse && req.params.post_index === 1) {
req.params.post_index = 0; req.params.post_index = 0;

Loading…
Cancel
Save