X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUncategorizedcategories.php;h=77b69264577ad8a53df287a38e04caed1289bc73;hb=560f7ef7f989f568449aff460563cd3e0ec1c3eb;hp=7c3265d625bfe099de39a8bd79d762c5d09ba671;hpb=f81bb12266ce27e4dc0c4d535333d5a1f71152c1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUncategorizedcategories.php b/includes/specials/SpecialUncategorizedcategories.php index 7c3265d625..77b6926457 100644 --- a/includes/specials/SpecialUncategorizedcategories.php +++ b/includes/specials/SpecialUncategorizedcategories.php @@ -40,7 +40,7 @@ class UncategorizedCategoriesPage extends UncategorizedPagesPage { } /** - * Returns an array of categorie titles (usually without the namespace), which + * Returns an array of category titles (usually without the namespace), which * shouldn't be listed on this page, even if they're uncategorized. * * @return array @@ -50,12 +50,15 @@ class UncategorizedCategoriesPage extends UncategorizedPagesPage { $exList = $this->msg( 'uncategorized-categories-exceptionlist' ) ->inContentLanguage()->plain(); $proposedTitles = explode( "\n", $exList ); - foreach ( $proposedTitles as $count => $title ) { - if ( strpos( $title, '*' ) !== 0 ) { + foreach ( $proposedTitles as $count => $titleStr ) { + if ( strpos( $titleStr, '*' ) !== 0 ) { continue; } - $title = preg_replace( "/^\\*\\s*/", '', $title ); - $title = Title::newFromText( $title, NS_CATEGORY ); + $titleStr = preg_replace( "/^\\*\\s*/", '', $titleStr ); + $title = Title::newFromText( $titleStr, NS_CATEGORY ); + if ( $title && $title->getNamespace() !== NS_CATEGORY ) { + $title = Title::makeTitleSafe( NS_CATEGORY, $titleStr ); + } if ( $title ) { $this->exceptionList[] = $title->getDBKey(); }