jenkins-bot has submitted this change and it was merged. Change subject: Remove unused mobile CentralNotice URLs ......................................................................
Remove unused mobile CentralNotice URLs In WMF setup, it is not expected that EnterMobileMode will be called from a load.php context. The code removed here apparently switched in mobile URLs in CentralNotice global variables that contain CentralNotice URLs for various banner-related purposes. However, those variables are used almost exclusively in JS, sent in via the ResourceLoaderGetConfigVars hook. The only exception is $wgCentralHost, which is used to set a dns-prefetch in the head. However, since we'll now use instead non-mobile URLs that don't redirect (see https://gerrit.wikimedia.org/r/#/c/182078/) it is preferable to have the non-mobile URL in that link. That the removed code is non-functional can be seen in the redirects in background calls to meta on production. Also removed a comment with a link to a bug that is now resolved. Change-Id: I6b74c4a1c7fd1cd03360b0d8a4d97b457997bfdc --- M wmf-config/mobile.php 1 file changed, 1 insertion(+), 7 deletions(-) Approvals: Reedy: Looks good to me, approved Awight: Looks good to me, but someone else must approve MaxSem: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php index 50f228a..f52b0f8 100644 --- a/wmf-config/mobile.php +++ b/wmf-config/mobile.php @@ -62,14 +62,8 @@ $wgMFNoMobileCategory = $wmgMFNoMobileCategory; $wgMFNoMobilePages = $wmgMFNoMobilePages; - // Hack to work around https://bugzilla.wikimedia.org/show_bug.cgi?id=35215 $wgHooks['EnterMobileMode'][] = function() { - global $wgCentralHost, $wgCentralPagePath, $wgCentralBannerDispatcher, $wgCentralBannerRecorder, $wgCentralAuthCookieDomain; - - $wgCentralHost = str_replace( 'meta.wikimedia.org', 'meta.m.wikimedia.org', $wgCentralHost ); - $wgCentralPagePath = str_replace( 'meta.wikimedia.org', 'meta.m.wikimedia.org', $wgCentralPagePath ); - $wgCentralBannerDispatcher = str_replace( 'meta.wikimedia.org', 'meta.m.wikimedia.org', $wgCentralBannerDispatcher ); - $wgCentralBannerRecorder = str_replace( 'meta.wikimedia.org', 'meta.m.wikimedia.org', $wgCentralBannerRecorder ); + global $wgCentralAuthCookieDomain; // Hack for bug https://bugzilla.wikimedia.org/show_bug.cgi?id=47647 if ( $wgCentralAuthCookieDomain == 'commons.wikimedia.org' ) { -- To view, visit https://gerrit.wikimedia.org/r/182132 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b74c4a1c7fd1cd03360b0d8a4d97b457997bfdc Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: AndyRussG <[email protected]> Gerrit-Reviewer: Awight <[email protected]> Gerrit-Reviewer: Ejegg <[email protected]> Gerrit-Reviewer: Katie Horn <[email protected]> Gerrit-Reviewer: MaxSem <[email protected]> Gerrit-Reviewer: Reedy <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
