Krinkle has uploaded a new change for review.

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

Change subject: Remove hardcoded $wgCanonicalServer from $wgResourceBasePath
......................................................................

Remove hardcoded $wgCanonicalServer from $wgResourceBasePath

* Effectively reverts 0dc9d418, 335cb25d0e.

* Simplifies configuration.

* 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.

BUg: T106966
Bug: T112646
Change-Id: Ib57d5d614baba7a6a437bfbfc87281f753c8afc1
---
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/11/238511/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/238511
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib57d5d614baba7a6a437bfbfc87281f753c8afc1
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

Reply via email to