http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97670

Revision: 97670
Author:   asher
Date:     2011-09-20 22:04:15 +0000 (Tue, 20 Sep 2011)
Log Message:
-----------
live hack - prevent resourceloader from serving errors when a db master is set 
to read-only

Modified Paths:
--------------
    branches/wmf/1.17wmf1/includes/resourceloader/ResourceLoaderFileModule.php

Modified: 
branches/wmf/1.17wmf1/includes/resourceloader/ResourceLoaderFileModule.php
===================================================================
--- branches/wmf/1.17wmf1/includes/resourceloader/ResourceLoaderFileModule.php  
2011-09-20 21:46:26 UTC (rev 97669)
+++ branches/wmf/1.17wmf1/includes/resourceloader/ResourceLoaderFileModule.php  
2011-09-20 22:04:15 UTC (rev 97670)
@@ -269,7 +269,7 @@
                // Collect referenced files
                $this->localFileRefs = array_unique( $this->localFileRefs );
                // If the list has been modified since last time we cached it, 
update the cache
-               if ( $this->localFileRefs !== $this->getFileDependencies( 
$context->getSkin() ) ) {
+               if ( $this->localFileRefs !== $this->getFileDependencies( 
$context->getSkin() ) && !wfReadOnly() ) {
                        $dbw = wfGetDB( DB_MASTER );
                        $dbw->replace( 'module_deps',
                                array( array( 'md_module', 'md_skin' ) ), array(


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to