Merge "Don't show warning header for non-standard workflows on login-continue"
[lhc/web/wiklou.git] / includes / specials / SpecialMediaStatistics.php
index e51e8b5..7683ad8 100644 (file)
@@ -62,7 +62,7 @@ class MediaStatisticsPage extends QueryPage {
         * Special:BrokenRedirects also rely on this.
         */
        public function getQueryInfo() {
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = wfGetDB( DB_REPLICA );
                $fakeTitle = $dbr->buildConcat( [
                        'img_media_type',
                        $dbr->addQuotes( ';' ),
@@ -353,6 +353,7 @@ class MediaStatisticsPage extends QueryPage {
         * @param ResultWrapper $res
         */
        public function preprocessResults( $dbr, $res ) {
+               $this->executeLBFromResultWrapper( $res );
                $this->totalCount = $this->totalBytes = 0;
                foreach ( $res as $row ) {
                        $mediaStats = $this->splitFakeTitle( $row->title );