aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles/prosilver/template/forum_fn.js
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2014-03-10 20:50:08 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2014-03-10 20:50:08 -0500
commitf7020fb5d1368020cf780deaeba56fee56e3dcfa (patch)
tree66f95cb75cf7c892c9ccebc830a654c3a896086e /phpBB/styles/prosilver/template/forum_fn.js
parent235f7c3721f792e0f732ed086e1118a2f08e37a6 (diff)
parent0119a21862bc433b50fe3914e3bae6f12f61129c (diff)
downloadforums-f7020fb5d1368020cf780deaeba56fee56e3dcfa.tar
forums-f7020fb5d1368020cf780deaeba56fee56e3dcfa.tar.gz
forums-f7020fb5d1368020cf780deaeba56fee56e3dcfa.tar.bz2
forums-f7020fb5d1368020cf780deaeba56fee56e3dcfa.tar.xz
forums-f7020fb5d1368020cf780deaeba56fee56e3dcfa.zip
Merge pull request #2092 from nickvergessen/ticket/12090
[ticket/12090] Pass route name to url() instead of the url itself
Diffstat (limited to 'phpBB/styles/prosilver/template/forum_fn.js')
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 408c9b9b8c..de51b54e9b 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -37,17 +37,14 @@ function jumpto(item) {
on_page = item.attr('data-on-page'),
per_page = item.attr('data-per-page'),
base_url = item.attr('data-base-url'),
+ start_name = item.attr('data-start-name'),
page = prompt(jump_page, on_page);
if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0) {
- 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(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
- }
+ if (base_url.indexOf('?') === -1) {
+ document.location.href = base_url + '?' + start_name + '=' + ((page - 1) * per_page);
} else {
- document.location.href = base_url.replace('%d', page);
+ document.location.href = base_url.replace(/&amp;/g, '&') + '&' + start_name + '=' + ((page - 1) * per_page);
}
}
}