* 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
* 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
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 );
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;