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 );
? $index - 1
: $index;
}
-
+
/**
* Returns whether the specified namespace exists
*/
* @return bool
*/
public static function canTalk( $index ) {
- return $index >= NS_MAIN;
+ return $index >= NS_MAIN;
}
/**
global $wgNamespacesWithSubpages;
return !empty( $wgNamespacesWithSubpages[$index] );
}
-
+
/**
* Is the namespace first-letter capitalized?
- *
+ *
* @param $index int Index to check
* @return bool
*/
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;