Change-Id: Ie10a5ee79846a4f1465fea7ce1b47da13b0787b7
'mediawiki.page.image.pagination' => [
'scripts' => 'resources/src/mediawiki/page/image-pagination.js',
'dependencies' => [
'mediawiki.page.image.pagination' => [
'scripts' => 'resources/src/mediawiki/page/image-pagination.js',
'dependencies' => [
'mediawiki.util',
'jquery.spinner',
],
'mediawiki.util',
'jquery.spinner',
],
function bindPageNavigation( $container ) {
$container.find( '.multipageimagenavbox' ).one( 'click', 'a', function ( e ) {
function bindPageNavigation( $container ) {
$container.find( '.multipageimagenavbox' ).one( 'click', 'a', function ( e ) {
// 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 ) );
// 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();
+ url = mw.util.getUrl( mw.config.get( 'wgPageName' ), { page: page } );
.text( mw.msg( msgKey ) )
.attr( 'title', mw.msg( 'tooltip-ca-' + action ) )
.updateTooltipAccessKeys()
.text( mw.msg( msgKey ) )
.attr( 'title', mw.msg( 'tooltip-ca-' + action ) )
.updateTooltipAccessKeys()
- .attr( 'href', mw.util.wikiScript() + '?' + $.param( {
- title: title,
- action: action
- } )
- );
+ .attr( 'href', mw.util.getUrl( title, { action: action } ) );
// Most common ID style
if ( $li.prop( 'id' ) === 'ca-' + otherAction ) {
// Most common ID style
if ( $li.prop( 'id' ) === 'ca-' + otherAction ) {