Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/94162


Change subject: Use getUrl rather than wikiGetlink
......................................................................

Use getUrl rather than wikiGetlink

See change in I8704a6620ece44d374e199c05464b8a553e12e74

Change-Id: I825220f5c9bdb96a22adf2dc2e4ae454dc51a2f8
---
M javascripts/common/CtaDrawer.js
M javascripts/common/PageApi.js
M javascripts/common/history-alpha.js
M javascripts/common/languages/LanguageOverlay.js
M javascripts/modules/keepgoing/KeepGoingDrawer.js
M javascripts/modules/lastEdited/lastEditedBeta.js
M javascripts/modules/nearby/NearbyApi.js
M javascripts/modules/nearby/PagePreviewOverlay.js
M javascripts/modules/notifications/NotificationsOverlay.js
M javascripts/modules/search/search.js
M javascripts/modules/talk/TalkOverlay.js
M tests/javascripts/common/test_PageApi.js
12 files changed, 15 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/62/94162/1

diff --git a/javascripts/common/CtaDrawer.js b/javascripts/common/CtaDrawer.js
index ee336ce..3638b83 100644
--- a/javascripts/common/CtaDrawer.js
+++ b/javascripts/common/CtaDrawer.js
@@ -19,8 +19,8 @@
                        }, options.queryParams ),
                                signupParams = $.extend( { type: 'signup' }, 
options.signupQueryParams );
 
-                       options.loginUrl = mw.util.wikiGetlink( 
'Special:UserLogin', params );
-                       options.signupUrl = mw.util.wikiGetlink( 
'Special:UserLogin', $.extend( params, signupParams ) );
+                       options.loginUrl = mw.util.getUrl( 'Special:UserLogin', 
params );
+                       options.signupUrl = mw.util.getUrl( 
'Special:UserLogin', $.extend( params, signupParams ) );
                }
        } );
 
diff --git a/javascripts/common/PageApi.js b/javascripts/common/PageApi.js
index ee503ec..05d899e 100644
--- a/javascripts/common/PageApi.js
+++ b/javascripts/common/PageApi.js
@@ -74,7 +74,7 @@
                                                        lead: sections[0].text,
                                                        sections: 
sections.slice( 1 ),
                                                        isMainPage: 
resp.mobileview.hasOwnProperty( 'mainpage' ) ? true : false,
-                                                       historyUrl: 
mw.util.wikiGetlink( title, { action: 'history' } ),
+                                                       historyUrl: 
mw.util.getUrl( title, { action: 'history' } ),
                                                        lastModifiedTimestamp: 
timestamp
                                                };
                                                // Add non-anonymous user 
information
diff --git a/javascripts/common/history-alpha.js 
b/javascripts/common/history-alpha.js
index fb87b7d..03f848e 100644
--- a/javascripts/common/history-alpha.js
+++ b/javascripts/common/history-alpha.js
@@ -25,7 +25,7 @@
        function init() {
                // use wgPageName to ensure we keep the namespace prefix
                var title = mw.config.get( 'wgPageName' ),
-                       currentUrl = mw.util.wikiGetlink( title, M.query );
+                       currentUrl = mw.util.getUrl( title, M.query );
                // initial history state does not contain title
                // run before binding to avoid nasty surprises
                History.replaceState( null, title, currentUrl );
@@ -47,7 +47,7 @@
                 * @param {String} pageTitle String representing the title of a 
page that should be loaded in the browser
                 */
                function navigateToPage( title ) {
-                       History.pushState( null, title, mw.util.wikiGetlink( 
title ) );
+                       History.pushState( null, title, mw.util.getUrl( title ) 
);
                }
 
                /**
diff --git a/javascripts/common/languages/LanguageOverlay.js 
b/javascripts/common/languages/LanguageOverlay.js
index cf37008..c0b3a88 100644
--- a/javascripts/common/languages/LanguageOverlay.js
+++ b/javascripts/common/languages/LanguageOverlay.js
@@ -5,7 +5,7 @@
 
        LanguageOverlay = Overlay.extend( {
                defaults: {
-                       languagesLink: mw.util.wikiGetlink( 
'Special:MobileOptions/Language' ),
+                       languagesLink: mw.util.getUrl( 
'Special:MobileOptions/Language' ),
                        languagesText: mw.msg( 
'mobile-frontend-language-footer' ),
                        placeholder: mw.msg( 
'mobile-frontend-language-site-choose' )
                },
diff --git a/javascripts/modules/keepgoing/KeepGoingDrawer.js 
b/javascripts/modules/keepgoing/KeepGoingDrawer.js
index f03f8fd..d3cfb7f 100644
--- a/javascripts/modules/keepgoing/KeepGoingDrawer.js
+++ b/javascripts/modules/keepgoing/KeepGoingDrawer.js
@@ -44,7 +44,7 @@
                        options = options || {};
                        api.get( { action: 'query', list: 'random', 
rnnamespace: '0', rnlimit: 1 } ).done( function( resp ) {
                                var page = resp.query.random[0],
-                                       url = mw.util.wikiGetlink( page.title, 
{ campaign: options.campaign, campaign_step: nextStep } );
+                                       url = mw.util.getUrl( page.title, { 
campaign: options.campaign, campaign_step: nextStep } );
 
                                options.nextUrl = url;
                                _super.call( self, options );
diff --git a/javascripts/modules/lastEdited/lastEditedBeta.js 
b/javascripts/modules/lastEdited/lastEditedBeta.js
index 1998ede..9513f1d 100644
--- a/javascripts/modules/lastEdited/lastEditedBeta.js
+++ b/javascripts/modules/lastEdited/lastEditedBeta.js
@@ -43,7 +43,7 @@
                                        // Abuse PLURAL support to determine if 
the user is anonymous or not
                                        mw.language.convertNumber( username ? 1 
: 0 ),
                                        // I'll abuse of PLURAL support means 
we have to pass the relative URL rather than construct it from a wikilink
-                                       username ? mw.util.wikiGetlink( 
'Special:UserProfile/' + username ) : '' ] );
+                                       username ? mw.util.getUrl( 
'Special:UserProfile/' + username ) : '' ] );
 
                        $( '<div>' ).attr( 'id', 'mw-mf-last-modified' ).
                                attr( 'class', $lastModified.attr( 'class' ) ).
diff --git a/javascripts/modules/nearby/NearbyApi.js 
b/javascripts/modules/nearby/NearbyApi.js
index fa1a708..ecb100a 100644
--- a/javascripts/modules/nearby/NearbyApi.js
+++ b/javascripts/modules/nearby/NearbyApi.js
@@ -101,7 +101,7 @@
                                                page.pageimageClass = 
'needsPhoto';
                                        }
                                        page.anchor = 'item_' + i;
-                                       page.url = mw.util.wikiGetlink( 
page.title );
+                                       page.url = mw.util.getUrl( page.title );
                                        if ( page.coordinates ) { // FIXME: 
protect against bug 47133 (remove when resolved)
                                                coords = page.coordinates[0];
                                                lngLat = { latitude: 
coords.lat, longitude: coords.lon };
diff --git a/javascripts/modules/nearby/PagePreviewOverlay.js 
b/javascripts/modules/nearby/PagePreviewOverlay.js
index e77cd94..b31bd41 100644
--- a/javascripts/modules/nearby/PagePreviewOverlay.js
+++ b/javascripts/modules/nearby/PagePreviewOverlay.js
@@ -65,7 +65,7 @@
                                var directionUrl;
                                options.heading = options.page.title;
                                options.preview = options.page.lead;
-                               options.url = mw.util.wikiGetlink( 
options.heading );
+                               options.url = mw.util.getUrl( options.heading );
                                options.readMoreLink = mw.msg( 
'mobile-frontend-nearby-link' );
 
                                if ( options.latLngString ) {
diff --git a/javascripts/modules/notifications/NotificationsOverlay.js 
b/javascripts/modules/notifications/NotificationsOverlay.js
index 5857e91..2d98a64 100644
--- a/javascripts/modules/notifications/NotificationsOverlay.js
+++ b/javascripts/modules/notifications/NotificationsOverlay.js
@@ -11,7 +11,7 @@
                        },
                        defaults: {
                                heading: mw.msg( 'notifications' ),
-                               archiveLink: mw.util.wikiGetlink( 
'Special:Notifications' ),
+                               archiveLink: mw.util.getUrl( 
'Special:Notifications' ),
                                archiveLinkMsg: mw.msg( 'echo-overlay-link' )
                        },
                        onError: function() {
diff --git a/javascripts/modules/search/search.js 
b/javascripts/modules/search/search.js
index 1d22270..b6846f9 100644
--- a/javascripts/modules/search/search.js
+++ b/javascripts/modules/search/search.js
@@ -84,7 +84,7 @@
                                return {
                                        heading: highlightSearchTerm( item, 
term ),
                                        title: item,
-                                       url: mw.util.wikiGetlink( item )
+                                       url: mw.util.getUrl( item )
                                };
                        } );
 
diff --git a/javascripts/modules/talk/TalkOverlay.js 
b/javascripts/modules/talk/TalkOverlay.js
index 243fb16..460ef40 100644
--- a/javascripts/modules/talk/TalkOverlay.js
+++ b/javascripts/modules/talk/TalkOverlay.js
@@ -92,7 +92,7 @@
                                                // FIXME: [LQT] remove when 
liquid threads is dead (see Bug 51586)
                                                } else if ( code === 'lqt' ) {
                                                        // Force a visit to the 
page
-                                                       window.location = 
mw.util.wikiGetlink( options.title );
+                                                       window.location = 
mw.util.getUrl( options.title );
                                                }
                                        }
                                } ).done( function( pageData ) {
diff --git a/tests/javascripts/common/test_PageApi.js 
b/tests/javascripts/common/test_PageApi.js
index 4500c82..89074e7 100644
--- a/tests/javascripts/common/test_PageApi.js
+++ b/tests/javascripts/common/test_PageApi.js
@@ -27,7 +27,7 @@
 
                pageApi.getPage( 'Test' ).done( function( resp ) {
                        assert.deepEqual( resp, {
-                               historyUrl: mw.util.wikiGetlink( 'Test', { 
action: 'history' } ),
+                               historyUrl: mw.util.getUrl( 'Test', { action: 
'history' } ),
                                lastModifiedUserName: 'bob',
                                lastModifiedUserGender: 'unknown',
                                lastModifiedTimestamp: 1382986196,
@@ -102,7 +102,7 @@
 
                pageApi.getPage( 'Test' ).done( function( resp ) {
                        assert.deepEqual( resp, {
-                               historyUrl: mw.util.wikiGetlink( 'Test', { 
action: 'history' } ),
+                               historyUrl: mw.util.getUrl( 'Test', { action: 
'history' } ),
                                lastModifiedUserName: 'Melissa',
                                lastModifiedUserGender: 'female',
                                lastModifiedTimestamp: 1382986196,

-- 
To view, visit https://gerrit.wikimedia.org/r/94162
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I825220f5c9bdb96a22adf2dc2e4ae454dc51a2f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to