aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/styles')
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js11
-rw-r--r--phpBB/styles/subsilver2/template/overall_header.html13
2 files changed, 19 insertions, 5 deletions
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 6694dfb61b..06c4d1e785 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -23,9 +23,16 @@ function jumpto()
{
var page = prompt(jump_page, on_page);
- if (page !== null && !isNaN(page) && page > 0)
+ if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
{
- document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page);
+ 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);
+ }
}
}
diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html
index 6db4f85690..a2ed06132d 100644
--- a/phpBB/styles/subsilver2/template/overall_header.html
+++ b/phpBB/styles/subsilver2/template/overall_header.html
@@ -39,12 +39,19 @@ function popup(url, width, height, name)
function jumpto()
{
var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
- var perpage = '{PER_PAGE}';
+ var per_page = '{PER_PAGE}';
var base_url = '{A_BASE_URL}';
- if (page !== null && !isNaN(page) && page > 0)
+ if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
{
- document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * perpage);
+ 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);
+ }
}
}