diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-04-17 16:05:25 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-04-17 16:05:25 +0000 |
commit | 4307a2c07f6559a71c3cf67f0cde60704ee373ea (patch) | |
tree | 5ea5923c11a3931b2d74c1f52fce32c75be4a854 /phpBB/adm/style/overall_header.html | |
parent | 77e21fc054abb722522e4694813149770980249a (diff) | |
download | forums-4307a2c07f6559a71c3cf67f0cde60704ee373ea.tar forums-4307a2c07f6559a71c3cf67f0cde60704ee373ea.tar.gz forums-4307a2c07f6559a71c3cf67f0cde60704ee373ea.tar.bz2 forums-4307a2c07f6559a71c3cf67f0cde60704ee373ea.tar.xz forums-4307a2c07f6559a71c3cf67f0cde60704ee373ea.zip |
Changed jumpto() JS function to be more fail-safe. (But #27635 - patch by peterkclee)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9466 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/adm/style/overall_header.html')
-rw-r--r-- | phpBB/adm/style/overall_header.html | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html index 0720519ce2..ccf38e49b8 100644 --- a/phpBB/adm/style/overall_header.html +++ b/phpBB/adm/style/overall_header.html @@ -28,9 +28,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); + } } } |