AndyRussG has uploaded a new change for review. https://gerrit.wikimedia.org/r/182132
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(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/32/182132/1 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: newchange Gerrit-Change-Id: I6b74c4a1c7fd1cd03360b0d8a4d97b457997bfdc Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: AndyRussG <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
