X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FMWNamespace.php;h=97dba26b95cac0efc338a8d590f295cf92100ed0;hp=4c5561fba871681692ccc96612343e6689a45c7d;hb=6c9a2923fe1ee3a65cb027be5e781772f2b12fbd;hpb=8bb5a6c461c31ee5ce6874548246fc2c520686f6 diff --git a/includes/MWNamespace.php b/includes/MWNamespace.php index 4c5561fba8..97dba26b95 100644 --- a/includes/MWNamespace.php +++ b/includes/MWNamespace.php @@ -278,12 +278,26 @@ class MWNamespace { } /** - * Can this namespace ever have a talk namespace? + * Does this namespace ever have a talk namespace? + * + * @deprecated since 1.30, use hasTalkNamespace() instead. * * @param int $index Namespace index - * @return bool + * @return bool True if this namespace either is or has a corresponding talk namespace. */ public static function canTalk( $index ) { + return self::hasTalkNamespace( $index ); + } + + /** + * Does this namespace ever have a talk namespace? + * + * @since 1.30 + * + * @param int $index Namespace ID + * @return bool True if this namespace either is or has a corresponding talk namespace. + */ + public static function hasTalkNamespace( $index ) { return $index >= NS_MAIN; } @@ -356,7 +370,7 @@ class MWNamespace { */ public static function getSubjectNamespaces() { return array_filter( - MWNamespace::getValidNamespaces(), + self::getValidNamespaces(), 'MWNamespace::isSubject' ); } @@ -369,7 +383,7 @@ class MWNamespace { */ public static function getTalkNamespaces() { return array_filter( - MWNamespace::getValidNamespaces(), + self::getValidNamespaces(), 'MWNamespace::isTalk' ); }