summaryrefslogtreecommitdiff
path: root/resources/mediawiki.page/mediawiki.page.image.pagination.js
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-07-31 06:43:27 +0200
committerPierre Schmitz <pierre@archlinux.de>2014-07-31 06:43:27 +0200
commit027fc6e70f7f9ce8422d4798fb02e67ff271ae4c (patch)
tree8163dff509e80309c82051a1095faab9396e280f /resources/mediawiki.page/mediawiki.page.image.pagination.js
parentf80b2307028ed4d9231a0bd46496b241dcf4aa5c (diff)
Update to MediaWiki 1.22.9
Diffstat (limited to 'resources/mediawiki.page/mediawiki.page.image.pagination.js')
-rw-r--r--resources/mediawiki.page/mediawiki.page.image.pagination.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/resources/mediawiki.page/mediawiki.page.image.pagination.js b/resources/mediawiki.page/mediawiki.page.image.pagination.js
index fb44a76f..11ed0ae4 100644
--- a/resources/mediawiki.page/mediawiki.page.image.pagination.js
+++ b/resources/mediawiki.page/mediawiki.page.image.pagination.js
@@ -31,7 +31,16 @@
function ajaxifyPageNavigation() {
// Intercept the default action of the links in the thumbnail navigation
$( '.multipageimagenavbox' ).one( 'click', 'a', function ( e ) {
- loadPage( this.href );
+ var page, uri;
+
+ // Generate the same URL on client side as the one generated in ImagePage::openShowImage.
+ // We avoid using the URL in the link directly since it could have been manipulated (bug 66608)
+ page = Number( mw.util.getParamValue( 'page', this.href ) );
+ uri = new mw.Uri( mw.util.wikiScript() )
+ .extend( { title: mw.config.get( 'wgPageName' ), page: page } )
+ .toString();
+
+ loadPage( uri );
e.preventDefault();
} );