X-Git-Url: http://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=includes%2FNamespace.php;h=5c8e63b74d489f20ed40b23be6e064e3a0f6d845;hb=39e22628f7c8dfeaff522c6a0ca06c0899743ff7;hp=fccfbedb4e7a7c828c2ddbeb908e6f547bce9922;hpb=dac3d8d7f28059ba7b30b4b74a5c0ec575c5854a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Namespace.php b/includes/Namespace.php index fccfbedb4e..5c8e63b74d 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -334,7 +334,7 @@ class MWNamespace { public static function getContentNamespaces() { global $wgContentNamespaces; if ( !is_array( $wgContentNamespaces ) || $wgContentNamespaces === array() ) { - return NS_MAIN; + return array( NS_MAIN ); } elseif ( !in_array( NS_MAIN, $wgContentNamespaces ) ) { // always force NS_MAIN to be part of array (to match the algorithm used by isContent) return array_merge( array( NS_MAIN ), $wgContentNamespaces ); @@ -387,9 +387,9 @@ class MWNamespace { if ( in_array( $index, self::$alwaysCapitalizedNamespaces ) ) { return true; } - if ( isset( $wgCapitalLinkOverrides[ $index ] ) ) { + if ( isset( $wgCapitalLinkOverrides[$index] ) ) { // $wgCapitalLinkOverrides is explicitly set - return $wgCapitalLinkOverrides[ $index ]; + return $wgCapitalLinkOverrides[$index]; } // Default to the global setting return $wgCapitalLinks;