more fixes

v1.18.x
Baris Soner Usakli 11 years ago
parent 1084523c92
commit 75f178636b

@ -42,7 +42,7 @@ define(function() {
pagination.loadPage = function(page, callback) {
page = parseInt(page, 10);
if(page < 1 || page > pagination.pageCount) {
if(!utils.isNumber(page) || page < 1 || page > pagination.pageCount) {
return;
}

@ -1018,6 +1018,9 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
if(config.usePagination) {
socket.emit('posts.getPidPage', pid, function(err, page) {
if(err) {
return;
}
if(parseInt(page, 10) !== pagination.currentPage) {
pagination.loadPage(page);
} else {

@ -196,6 +196,7 @@
template_data = data;
parse_template();
}).fail(function (data, textStatus) {
jQuery('#content, #footer').stop(true, true).removeClass('ajaxifying');
if (data && data.status == 404) {
return ajaxify.go('404');
} else if (data && data.status === 403) {

@ -171,7 +171,7 @@ var path = require('path'),
page = req.query.page;
}
if(parseInt(page, 10) < 1) {
if(!utils.isNumber(page) || parseInt(page, 10) < 1) {
return res.send(404);
}

@ -8,6 +8,7 @@ var fs = require('fs'),
posts = require('./../posts'),
postTools = require('../postTools'),
utils = require('./../../public/src/utils'),
templates = require('./../../public/src/templates'),
meta = require('./../meta'),
db = require('./../database');

Loading…
Cancel
Save