X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fpage%2FImagePage.php;h=af778682c7323ac4bfe9f4591d5ac6f028faf1aa;hb=18b211c3341791f35961ac4ea09d092cb7c389d1;hp=106911c5fe2748388c385097305d8002884e68bc;hpb=21463af0d8db7d7ea8e0e87e48e75cd3acb832b7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/page/ImagePage.php b/includes/page/ImagePage.php index 106911c5fe..af778682c7 100644 --- a/includes/page/ImagePage.php +++ b/includes/page/ImagePage.php @@ -52,18 +52,6 @@ class ImagePage extends Article { return new WikiFilePage( $title ); } - /** - * Constructor from a page id - * @param int $id Article ID to load - * @return ImagePage|null - */ - public static function newFromID( $id ) { - $t = Title::newFromID( $id ); - # @todo FIXME: Doesn't inherit right - return $t == null ? null : new self( $t ); - # return $t == null ? null : new static( $t ); // PHP 5.3 - } - /** * @param File $file * @return void @@ -222,11 +210,12 @@ class ImagePage extends Article { $out->addStyle( $css ); } } - // always show the local local Filepage.css, bug 29277 - $out->addModuleStyles( 'filepage' ); - // Add MediaWiki styles for a file page - $out->addModuleStyles( 'mediawiki.action.view.filepage' ); + $out->addModuleStyles( [ + 'filepage', // always show the local local Filepage.css, bug 29277 + 'mediawiki.action.view.filepage', // Add MediaWiki styles for a file page + ] ); + } /** @@ -809,7 +798,7 @@ EOT * @return ResultWrapper */ protected function queryImageLinks( $target, $limit ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); return $dbr->select( [ 'imagelinks', 'page' ],