Merge "Support multiple extension-dir paths to be passed to mergeMessageFileList"
[lhc/web/wiklou.git] / includes / MovePage.php
index 6d69eaa..321b7e3 100644 (file)
@@ -248,6 +248,9 @@ class MovePage {
                }
 
                $dbw->startAtomic( __METHOD__ );
+
+               Hooks::run( 'TitleMoveStarting', [ $this->oldTitle, $this->newTitle, $user ] );
+
                $pageid = $this->oldTitle->getArticleID( Title::GAID_FOR_UPDATE );
                $protected = $this->oldTitle->isProtected();
 
@@ -366,7 +369,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 = WatchedItemStore::getDefaultInstance();
+                       $store->duplicateAllAssociatedEntries( $this->oldTitle, $this->newTitle );
                }
 
                Hooks::run(