X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMovePage.php;h=24178acdad4e4e5dc9bb2080efa0b63d819346f4;hb=571a44a4bef0cdecc329636bfaa8f3935380c3f0;hp=1919c0c5ea92af219640ce195ffb2d3a1e81457d;hpb=70d9fbb0bfacaf837b7e8efb3770245d646ab522;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MovePage.php b/includes/MovePage.php index 1919c0c5ea..24178acdad 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -106,7 +106,7 @@ class MovePage { $oldid = $this->oldTitle->getArticleID(); - if ( strlen( $this->newTitle->getDBkey() ) < 1 ) { + if ( $this->newTitle->getDBkey() === '' ) { $status->fatal( 'articleexists' ); } if ( @@ -272,7 +272,8 @@ class MovePage { [ 'cl_from' => $pageid ], __METHOD__ ); - $type = MWNamespace::getCategoryLinkType( $this->newTitle->getNamespace() ); + $type = MediaWikiServices::getInstance()->getNamespaceInfo()-> + getCategoryLinkType( $this->newTitle->getNamespace() ); foreach ( $prefixes as $prefixRow ) { $prefix = $prefixRow->cl_sortkey_prefix; $catTo = $prefixRow->cl_to; @@ -426,9 +427,9 @@ class MovePage { * Move a file associated with a page to a new location. * Can also be used to revert after a DB failure. * - * @access private - * @param Title Old location to move the file from. - * @param Title New location to move the file to. + * @private + * @param Title $oldTitle Old location to move the file from. + * @param Title $newTitle New location to move the file to. * @return Status */ private function moveFile( $oldTitle, $newTitle ) {