From f16a7e351f30e70692adb0f51605e4826b92d597 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 22 Aug 2013 14:36:22 +0200 Subject: [ticket/11805] Fix "jump to page" feature for pagination in routes PHPBB3-11805 --- phpBB/styles/prosilver/template/forum_fn.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'phpBB/styles') diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index 693211983f..800fadd972 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -40,10 +40,14 @@ function jumpto(item) { page = prompt(jump_page, on_page); if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0) { - if (base_url.indexOf('?') === -1) { - document.location.href = base_url + '?start=' + ((page - 1) * per_page); + if (base_url.indexOf('%d') === -1) { + if (base_url.indexOf('?') === -1) { + document.location.href = base_url + '?start=' + ((page - 1) * per_page); + } else { + document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page); + } } else { - document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page); + document.location.href = base_url.replace('%d', page); } } } -- cgit v1.2.1