Merge "mediawiki.jqueryMsg: Implement `<nowiki>` support"
[lhc/web/wiklou.git] / includes / MovePage.php
index afa4e1c..708dea1 100644 (file)
@@ -19,6 +19,8 @@
  * @file
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Handles the backend logic of moving a page from one title
  * to another.
@@ -238,7 +240,7 @@ class MovePage {
                        $file->load( File::READ_LATEST );
                        if ( $file->exists() ) {
                                $status = $file->move( $this->newTitle );
-                               if ( !$status->isOk() ) {
+                               if ( !$status->isOK() ) {
                                        return $status;
                                }
                        }
@@ -369,7 +371,8 @@ class MovePage {
                $oldsnamespace = MWNamespace::getSubject( $this->oldTitle->getNamespace() );
                $newsnamespace = MWNamespace::getSubject( $this->newTitle->getNamespace() );
                if ( $oldsnamespace != $newsnamespace || $oldtitle != $newtitle ) {
-                       WatchedItem::duplicateEntries( $this->oldTitle, $this->newTitle );
+                       $store = MediaWikiServices::getInstance()->getWatchedItemStore();
+                       $store->duplicateAllAssociatedEntries( $this->oldTitle, $this->newTitle );
                }
 
                Hooks::run(