X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2FNamespace.php;h=e8e7523fc2f075150aea8eb4f7040a25a44ee676;hb=1e2840cd3139a2d0b2cb1afad763a20b0416d48d;hp=8bf784fd95009f66b2db6733e8f9f716be608658;hpb=29ed343b4c57a662eee2c19bacac1f12198debcf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Namespace.php b/includes/Namespace.php index 8bf784fd95..e8e7523fc2 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -8,7 +8,6 @@ * Definitions of the NS_ constants are in Defines.php * @private */ -global $wgCanonicalNamespaceNames; $wgCanonicalNamespaceNames = array( NS_MEDIA => 'Media', NS_SPECIAL => 'Special', @@ -47,8 +46,8 @@ if( isset( $wgExtraNamespaces ) && is_array( $wgExtraNamespaces ) ) { class MWNamespace { /** - * These namespaces should always be first-letter capitalized, now and - * forevermore. Historically, they could've probably been lowercased too, + * These namespaces should always be first-letter capitalized, now and + * forevermore. Historically, they could've probably been lowercased too, * but some things are just too ingrained now. :) */ private static $alwaysCapitalizedNamespaces = array( NS_SPECIAL, NS_USER, NS_MEDIAWIKI ); @@ -108,7 +107,7 @@ class MWNamespace { ? $index - 1 : $index; } - + /** * Returns whether the specified namespace exists */ @@ -163,7 +162,7 @@ class MWNamespace { * @return bool */ public static function canTalk( $index ) { - return $index >= NS_MAIN; + return $index >= NS_MAIN; } /** @@ -198,10 +197,10 @@ class MWNamespace { global $wgNamespacesWithSubpages; return !empty( $wgNamespacesWithSubpages[$index] ); } - + /** * Is the namespace first-letter capitalized? - * + * * @param $index int Index to check * @return bool */ @@ -209,10 +208,10 @@ class MWNamespace { global $wgCapitalLinks, $wgCapitalLinkOverrides; // Turn NS_MEDIA into NS_FILE $index = $index === NS_MEDIA ? NS_FILE : $index; - + // Make sure to get the subject of our namespace $index = self::getSubject( $index ); - + // Some namespaces are special and should always be upper case if ( in_array( $index, self::$alwaysCapitalizedNamespaces ) ) { return true;