X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FNamespace.php;h=5c8e63b74d489f20ed40b23be6e064e3a0f6d845;hb=af94bc9c69db033c7308192b42a47a4f27e25878;hp=71d737e220fb4548f3176622d090c2cf9dd968a5;hpb=6bc4c21ed1914abe31507fa132909e7f947e6075;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Namespace.php b/includes/Namespace.php index 71d737e220..5c8e63b74d 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -182,7 +182,7 @@ class MWNamespace { * sure that code will not potentially break. * * @param int $ns1 The first namespace index - * @param int $ns2 The second namespae index + * @param int $ns2 The second namespace index * * @return bool * @since 1.19 @@ -197,7 +197,7 @@ class MWNamespace { * NS_USER and NS_USER_TALK will return true. * * @param int $ns1 The first namespace index - * @param int $ns2 The second namespae index + * @param int $ns2 The second namespace index * * @return bool * @since 1.19 @@ -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;