mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 17:35:46 +01:00
more fixes
This commit is contained in:
@@ -42,7 +42,7 @@ define(function() {
|
|||||||
|
|
||||||
pagination.loadPage = function(page, callback) {
|
pagination.loadPage = function(page, callback) {
|
||||||
page = parseInt(page, 10);
|
page = parseInt(page, 10);
|
||||||
if(page < 1 || page > pagination.pageCount) {
|
if(!utils.isNumber(page) || page < 1 || page > pagination.pageCount) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1018,6 +1018,9 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
|||||||
|
|
||||||
if(config.usePagination) {
|
if(config.usePagination) {
|
||||||
socket.emit('posts.getPidPage', pid, function(err, page) {
|
socket.emit('posts.getPidPage', pid, function(err, page) {
|
||||||
|
if(err) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(parseInt(page, 10) !== pagination.currentPage) {
|
if(parseInt(page, 10) !== pagination.currentPage) {
|
||||||
pagination.loadPage(page);
|
pagination.loadPage(page);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -196,6 +196,7 @@
|
|||||||
template_data = data;
|
template_data = data;
|
||||||
parse_template();
|
parse_template();
|
||||||
}).fail(function (data, textStatus) {
|
}).fail(function (data, textStatus) {
|
||||||
|
jQuery('#content, #footer').stop(true, true).removeClass('ajaxifying');
|
||||||
if (data && data.status == 404) {
|
if (data && data.status == 404) {
|
||||||
return ajaxify.go('404');
|
return ajaxify.go('404');
|
||||||
} else if (data && data.status === 403) {
|
} else if (data && data.status === 403) {
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ var path = require('path'),
|
|||||||
page = req.query.page;
|
page = req.query.page;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(parseInt(page, 10) < 1) {
|
if(!utils.isNumber(page) || parseInt(page, 10) < 1) {
|
||||||
return res.send(404);
|
return res.send(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ var fs = require('fs'),
|
|||||||
posts = require('./../posts'),
|
posts = require('./../posts'),
|
||||||
postTools = require('../postTools'),
|
postTools = require('../postTools'),
|
||||||
utils = require('./../../public/src/utils'),
|
utils = require('./../../public/src/utils'),
|
||||||
|
templates = require('./../../public/src/templates'),
|
||||||
meta = require('./../meta'),
|
meta = require('./../meta'),
|
||||||
db = require('./../database');
|
db = require('./../database');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user