Merge "Ensure users are able to edit the page after changing the content model"
[lhc/web/wiklou.git] / includes / page / ImagePage.php
index 1396685..af77868 100644 (file)
@@ -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
@@ -810,7 +798,7 @@ EOT
         * @return ResultWrapper
         */
        protected function queryImageLinks( $target, $limit ) {
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = wfGetDB( DB_REPLICA );
 
                return $dbr->select(
                        [ 'imagelinks', 'page' ],