X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2Ffile%2FArchivedFile.php;h=921e129c36f564ddfbd7c34e3f97b5645000b4b3;hb=3649eb7db23edd9a9fa302994e9e916c59288dab;hp=ca1ea84827cd5ecef3e4f767d568e1284494651b;hpb=8eac2feedb7ee093d2c48504e1eb2b8a9dbc8452;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/file/ArchivedFile.php b/includes/filerepo/file/ArchivedFile.php index ca1ea84827..921e129c36 100644 --- a/includes/filerepo/file/ArchivedFile.php +++ b/includes/filerepo/file/ArchivedFile.php @@ -177,7 +177,7 @@ class ArchivedFile { if ( !$this->title || $this->title->getNamespace() == NS_FILE ) { $this->dataLoaded = true; // set it here, to have also true on miss - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $row = $dbr->selectRow( 'filearchive', self::selectFields(), @@ -425,6 +425,7 @@ class ArchivedFile { */ function pageCount() { if ( !isset( $this->pageCount ) ) { + // @FIXME: callers expect File objects if ( $this->getHandler() && $this->handler->isMultiPage( $this ) ) { $this->pageCount = $this->handler->pageCount( $this ); } else {