Introduce MovePageFactory
[lhc/web/wiklou.git] / includes / api / ApiMove.php
index 540860b..0a788d4 100644 (file)
@@ -172,7 +172,7 @@ class ApiMove extends ApiBase {
         * @return Status
         */
        protected function movePage( Title $from, Title $to, $reason, $createRedirect, $changeTags ) {
-               $mp = new MovePage( $from, $to );
+               $mp = MediaWikiServices::getInstance()->getMovePageFactory()->newMovePage( $from, $to );
                $valid = $mp->isValidMove();
                if ( !$valid->isOK() ) {
                        return $valid;