diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-08-22 14:36:22 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-09-25 17:34:29 +0200 |
commit | f16a7e351f30e70692adb0f51605e4826b92d597 (patch) | |
tree | 25378180bd77917e6ccfa87366fa9c3ee1cd727d | |
parent | 0abb4a5ad3a2d5de9215473f07693b5610ee8945 (diff) | |
download | forums-f16a7e351f30e70692adb0f51605e4826b92d597.tar forums-f16a7e351f30e70692adb0f51605e4826b92d597.tar.gz forums-f16a7e351f30e70692adb0f51605e4826b92d597.tar.bz2 forums-f16a7e351f30e70692adb0f51605e4826b92d597.tar.xz forums-f16a7e351f30e70692adb0f51605e4826b92d597.zip |
[ticket/11805] Fix "jump to page" feature for pagination in routes
PHPBB3-11805
-rw-r--r-- | phpBB/styles/prosilver/template/forum_fn.js | 10 |
1 files changed, 7 insertions, 3 deletions
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); } } } |