Merge "Remove full form of ChangeTags::buildTagFilterSelector"
[lhc/web/wiklou.git] / includes / filerepo / LocalRepo.php
index eaec151..7b40a7b 100644 (file)
@@ -453,11 +453,11 @@ class LocalRepo extends FileRepo {
        }
 
        /**
-        * Get a connection to the slave DB
+        * Get a connection to the replica DB
         * @return DatabaseBase
         */
        function getSlaveDB() {
-               return wfGetDB( DB_SLAVE );
+               return wfGetDB( DB_REPLICA );
        }
 
        /**
@@ -469,7 +469,7 @@ class LocalRepo extends FileRepo {
        }
 
        /**
-        * Get a callback to get a DB handle given an index (DB_SLAVE/DB_MASTER)
+        * Get a callback to get a DB handle given an index (DB_REPLICA/DB_MASTER)
         * @return Closure
         */
        protected function getDBFactory() {
@@ -500,9 +500,12 @@ class LocalRepo extends FileRepo {
        function invalidateImageRedirect( Title $title ) {
                $key = $this->getSharedCacheKey( 'image_redirect', md5( $title->getDBkey() ) );
                if ( $key ) {
-                       $this->getMasterDB()->onTransactionPreCommitOrIdle( function() use ( $key ) {
-                               ObjectCache::getMainWANInstance()->delete( $key );
-                       } );
+                       $this->getMasterDB()->onTransactionPreCommitOrIdle(
+                               function () use ( $key ) {
+                                       ObjectCache::getMainWANInstance()->delete( $key );
+                               },
+                               __METHOD__
+                       );
                }
        }