r98760 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98759‎ | r98760 | r98761 >
Date:13:37, 3 October 2011
Author:reedy
Status:ok
Tags:
Comment:
Merge r97771, r97775
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/resourceloader/ResourceLoaderFileModule.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/resourceloader/ResourceLoaderFileModule.php
@@ -148,9 +148,13 @@
149149 public function __construct( $options = array(), $localBasePath = null,
150150 $remoteBasePath = null )
151151 {
152 - global $IP, $wgScriptPath;
 152+ global $IP, $wgScriptPath, $wgResourceBasePath;
153153 $this->localBasePath = $localBasePath === null ? $IP : $localBasePath;
154 - $this->remoteBasePath = $remoteBasePath === null ? $wgScriptPath : $remoteBasePath;
 154+ if ( $remoteBasePath !== null ) {
 155+ $this->remoteBasePath = $remoteBasePath;
 156+ } else {
 157+ $this->remoteBasePath = $wgResourceBasePath === null ? $wgScriptPath : $wgResourceBasePath;
 158+ }
155159
156160 if ( isset( $options['remoteExtPath'] ) ) {
157161 global $wgExtensionAssetsPath;
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1381,6 +1381,7 @@
13821382 *
13831383 * $wgDefaultExternalStore = array( 'DB://cluster1', 'DB://cluster2' );
13841384 *
 1385+ * @var array
13851386 */
13861387 $wgDefaultExternalStore = false;
13871388
@@ -2487,6 +2488,12 @@
24882489 */
24892490 $wgResourceLoaderSources = array();
24902491
 2492+/*
 2493+ * Default 'remoteBasePath' value for resource loader modules.
 2494+ * If not set, then $wgScriptPath will be used as a fallback.
 2495+ */
 2496+$wgResourceBasePath = null;
 2497+
24912498 /**
24922499 * Maximum time in seconds to cache resources served by the resource loader
24932500 */

Follow-up revisions

RevisionCommit summaryAuthorDate
r99996MFT r98760, r98761reedy22:40, 16 October 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97771Hacked in $wgResourceBasePath variable for setting the default base path for ...aaron00:06, 22 September 2011
r97775Fixed wtf from r97771aaron00:38, 22 September 2011

Status & tagging log