Merge "Add CollationFa"
[lhc/web/wiklou.git] / includes / filerepo / file / OldLocalFile.php
index a17ca6e..dfaae73 100644 (file)
@@ -86,7 +86,7 @@ class OldLocalFile extends LocalFile {
         * @return bool|OldLocalFile
         */
        static function newFromKey( $sha1, $repo, $timestamp = false ) {
-               $dbr = $repo->getSlaveDB();
+               $dbr = $repo->getReplicaDB();
 
                $conds = [ 'oi_sha1' => $sha1 ];
                if ( $timestamp ) {
@@ -179,7 +179,7 @@ class OldLocalFile extends LocalFile {
 
                $dbr = ( $flags & self::READ_LATEST )
                        ? $this->repo->getMasterDB()
-                       : $this->repo->getSlaveDB();
+                       : $this->repo->getReplicaDB();
 
                $conds = [ 'oi_name' => $this->getName() ];
                if ( is_null( $this->requestedTime ) ) {
@@ -194,16 +194,14 @@ class OldLocalFile extends LocalFile {
                } else {
                        $this->fileExists = false;
                }
-
        }
 
        /**
         * Load lazy file metadata from the DB
         */
        protected function loadExtraFromDB() {
-
                $this->extraDataLoaded = true;
-               $dbr = $this->repo->getSlaveDB();
+               $dbr = $this->repo->getReplicaDB();
                $conds = [ 'oi_name' => $this->getName() ];
                if ( is_null( $this->requestedTime ) ) {
                        $conds['oi_archive_name'] = $this->archive_name;
@@ -227,7 +225,6 @@ class OldLocalFile extends LocalFile {
                } else {
                        throw new MWException( "Could not find data for image '{$this->archive_name}'." );
                }
-
        }
 
        /**