r99996 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99995‎ | r99996 | r99997 >
Date:22:40, 16 October 2011
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_18/phase3 (modified) (history)
  • /branches/REL1_18/phase3/includes (modified) (history)
  • /branches/REL1_18/phase3/includes/DefaultSettings.php (modified) (history)
  • /branches/REL1_18/phase3/includes/Skin.php (modified) (history)
  • /branches/REL1_18/phase3/includes/resourceloader/ResourceLoaderFileModule.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/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;
@@ -258,7 +262,7 @@
259263 // Collect referenced files
260264 $this->localFileRefs = array_unique( $this->localFileRefs );
261265 // If the list has been modified since last time we cached it, update the cache
262 - if ( $this->localFileRefs !== $this->getFileDependencies( $context->getSkin() ) ) {
 266+ if ( $this->localFileRefs !== $this->getFileDependencies( $context->getSkin() ) && !wfReadOnly() ) {
263267 $dbw = wfGetDB( DB_MASTER );
264268 $dbw->replace( 'module_deps',
265269 array( array( 'md_module', 'md_skin' ) ), array(
Index: branches/REL1_18/phase3/includes/DefaultSettings.php
@@ -1376,6 +1376,7 @@
13771377 *
13781378 * $wgDefaultExternalStore = array( 'DB://cluster1', 'DB://cluster2' );
13791379 *
 1380+ * @var array
13801381 */
13811382 $wgDefaultExternalStore = false;
13821383
@@ -2458,6 +2459,12 @@
24592460 */
24602461 $wgResourceModules = array();
24612462
 2463+/*
 2464+ * Default 'remoteBasePath' value for resource loader modules.
 2465+ * If not set, then $wgScriptPath will be used as a fallback.
 2466+ */
 2467+$wgResourceBasePath = null;
 2468+
24622469 /**
24632470 * Maximum time in seconds to cache resources served by the resource loader
24642471 */
Index: branches/REL1_18/phase3/includes/Skin.php
@@ -281,7 +281,7 @@
282282 if ( User::isIP( $rootUser ) ) {
283283 $this->mRelevantUser = User::newFromName( $rootUser, false );
284284 } else {
285 - $user = User::newFromName( $rootUser );
 285+ $user = User::newFromName( $rootUser, false );
286286 if ( $user->isLoggedIn() ) {
287287 $this->mRelevantUser = $user;
288288 }
Property changes on: branches/REL1_18/phase3/includes
___________________________________________________________________
Modified: svn:mergeinfo
289289 Merged /trunk/phase3/includes:r98760-98761
Property changes on: branches/REL1_18/phase3
___________________________________________________________________
Modified: svn:mergeinfo
290290 Merged /trunk/phase3:r98760-98761

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98760Merge r97771, r97775reedy13:37, 3 October 2011
r98761Merge r97670, r98206reedy13:41, 3 October 2011

Status & tagging log