X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMWNamespace.php;h=89cb616a7bfbbded18c616e4c3cd6604e30d9cbc;hb=33eabfd8d6a738ae3ed13e3f52c0bbd7664e581a;hp=61e34ee9b2822bf8d189ffbf33243775f99904b1;hpb=a85d1b9d0cd7f02111d3a647d5b91e3b1f334563;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MWNamespace.php b/includes/MWNamespace.php index 61e34ee9b2..89cb616a7b 100644 --- a/includes/MWNamespace.php +++ b/includes/MWNamespace.php @@ -28,7 +28,6 @@ * * These are synonyms for the names given in the language file * Users and translators should not change them - * */ class MWNamespace { @@ -279,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; }