X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMovePage.php;h=004ca076418a3d31e4cafac70c9c9f37cacf3474;hb=9792a09c306a6604a127a3a06f7b10cbc7e7a23f;hp=e49398a0f7089b4ee59d563326cef71eb179dc8d;hpb=04fd74f44fe5d5cdae7551ef0cc7baac1a87d18d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MovePage.php b/includes/MovePage.php index e49398a0f7..004ca07641 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -327,7 +327,8 @@ class MovePage { [ 'cl_from' => $pageid ], __METHOD__ ); - $type = MediaWikiServices::getInstance()->getNamespaceInfo()-> + $services = MediaWikiServices::getInstance(); + $type = $services->getNamespaceInfo()-> getCategoryLinkType( $this->newTitle->getNamespace() ); foreach ( $prefixes as $prefixRow ) { $prefix = $prefixRow->cl_sortkey_prefix; @@ -428,11 +429,13 @@ class MovePage { # Update watchlists $oldtitle = $this->oldTitle->getDBkey(); $newtitle = $this->newTitle->getDBkey(); - $oldsnamespace = MWNamespace::getSubject( $this->oldTitle->getNamespace() ); - $newsnamespace = MWNamespace::getSubject( $this->newTitle->getNamespace() ); + $oldsnamespace = $services->getNamespaceInfo()-> + getSubject( $this->oldTitle->getNamespace() ); + $newsnamespace = $services->getNamespaceInfo()-> + getSubject( $this->newTitle->getNamespace() ); if ( $oldsnamespace != $newsnamespace || $oldtitle != $newtitle ) { - $store = MediaWikiServices::getInstance()->getWatchedItemStore(); - $store->duplicateAllAssociatedEntries( $this->oldTitle, $this->newTitle ); + $services->getWatchedItemStore()->duplicateAllAssociatedEntries( + $this->oldTitle, $this->newTitle ); } // If it is a file then move it last.