Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/238543
Change subject: Remove hardcoded $wgCanonicalServer from $wgResourceBasePath ...................................................................... Remove hardcoded $wgCanonicalServer from $wgResourceBasePath * Simplifies configuration (effectively reverting 0dc9d418, 335cb25d0e). * Fixes bug where mobile page views connect to load.php from the canonical domain because the MobileContext is only triggered when generating HTML, not when generating the startup module – which is what orchestrates all dynamic load.php requests. This is a re-commit of f41d6b0f65c40e. Depends on Ie25d3a8f6956 in MediaWiki. Bug: T106966 Bug: T112646 Change-Id: Ia199ce3f650531e84d4264d0ab5a16852c907011 --- M wmf-config/CommonSettings.php M wmf-config/mobile.php 2 files changed, 12 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/43/238543/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index c595998..6cc2637 100755 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -201,18 +201,19 @@ unset( $wgStylePath ); unset( $wgStyleSheetPath ); -$wgLoadScript = "{$wgCanonicalServer}/w/load.php"; -$wgResourceBasePath = "{$wgCanonicalServer}/static/{$wmgVersionNumber}"; -$wgExtensionAssetsPath = "{$wgResourceBasePath}/extensions"; -$wgStylePath = "{$wgResourceBasePath}/skins"; - -$wgArticlePath = "/wiki/$1"; +$wgInternalServer = $wgCanonicalServer; +$wgArticlePath = '/wiki/$1'; $wgScriptPath = '/w'; -$wgLocalStylePath = "$wgScriptPath/static/$wmgVersionNumber/skins"; -$wgScript = $wgScriptPath . '/index.php'; -$wgRedirectScript = $wgScriptPath . '/redirect.php'; -$wgInternalServer = $wgCanonicalServer; +$wgScript = "{$wgScriptPath}/index.php"; +$wgRedirectScript = "{$wgScriptPath}/redirect.php"; +$wgLoadScript = "{$wgScriptPath}/load.php"; +$wgLocalStylePath = "{$wgScriptPath}/static/$wmgVersionNumber/skins"; + +// Don't include a hostname in these urls (T106966, T112646) +$wgResourceBasePath = "/static/{$wmgVersionNumber}"; +$wgExtensionAssetsPath = "{$wgResourceBasePath}/extensions"; +$wgStylePath = "{$wgResourceBasePath}/skins"; // Deprecated $wgStyleSheetPath = $wgStylePath; diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php index 9158a2e..6f89055 100644 --- a/wmf-config/mobile.php +++ b/wmf-config/mobile.php @@ -65,17 +65,7 @@ $wgMFNoMobilePages = $wmgMFNoMobilePages; $wgHooks['EnterMobileMode'][] = function() { - global $wgCentralAuthCookieDomain, $wgExtensionAssetsPath, - $wgLoadScript, $wgResourceBasePath, $wgStylePath, $wgStyleSheetPath; - - $mobileContext = MobileContext::singleton(); - $wgLoadScript = $mobileContext->getMobileUrl( $wgLoadScript ); - $wgResourceBasePath = $mobileContext->getMobileUrl( $wgResourceBasePath ); - $wgExtensionAssetsPath = "{$wgResourceBasePath}/extensions"; - $wgStylePath = "{$wgResourceBasePath}/skins"; - - // Deprecated - $wgStyleSheetPath = $wgStylePath; + global $wgCentralAuthCookieDomain; // Hack for T49647 if ( $wgCentralAuthCookieDomain == 'commons.wikimedia.org' ) { -- To view, visit https://gerrit.wikimedia.org/r/238543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia199ce3f650531e84d4264d0ab5a16852c907011 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Krinkle <krinklem...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits