Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/238532
Change subject: Revert "Remove hardcoded $wgCanonicalServer from $wgResourceBasePath" ...................................................................... Revert "Remove hardcoded $wgCanonicalServer from $wgResourceBasePath" Works as intended in that mw.loader.addSource and wgLoadScript are now relative. But this change also caused page HTML (which was previously okay) to now use en.wikipedia.org instead of en.m.wikipedia.org. Probably an wfExpandUrl() somewhere. This reverts commit f41d6b0f65c40e817c07368b838f0f42db63c9a9. Change-Id: Ic86977ec683275bbe177d4fc74291c41a878baad --- M wmf-config/CommonSettings.php M wmf-config/mobile.php 2 files changed, 21 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/32/238532/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 6cc2637..c595998 100755 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -201,20 +201,19 @@ unset( $wgStylePath ); unset( $wgStyleSheetPath ); -$wgInternalServer = $wgCanonicalServer; -$wgArticlePath = '/wiki/$1'; - -$wgScriptPath = '/w'; -$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}"; +$wgLoadScript = "{$wgCanonicalServer}/w/load.php"; +$wgResourceBasePath = "{$wgCanonicalServer}/static/{$wmgVersionNumber}"; $wgExtensionAssetsPath = "{$wgResourceBasePath}/extensions"; $wgStylePath = "{$wgResourceBasePath}/skins"; +$wgArticlePath = "/wiki/$1"; + +$wgScriptPath = '/w'; +$wgLocalStylePath = "$wgScriptPath/static/$wmgVersionNumber/skins"; +$wgScript = $wgScriptPath . '/index.php'; +$wgRedirectScript = $wgScriptPath . '/redirect.php'; +$wgInternalServer = $wgCanonicalServer; + // Deprecated $wgStyleSheetPath = $wgStylePath; diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php index 6f89055..9158a2e 100644 --- a/wmf-config/mobile.php +++ b/wmf-config/mobile.php @@ -65,7 +65,17 @@ $wgMFNoMobilePages = $wmgMFNoMobilePages; $wgHooks['EnterMobileMode'][] = function() { - global $wgCentralAuthCookieDomain; + 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; // Hack for T49647 if ( $wgCentralAuthCookieDomain == 'commons.wikimedia.org' ) { -- To view, visit https://gerrit.wikimedia.org/r/238532 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic86977ec683275bbe177d4fc74291c41a878baad 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