X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FMWNamespace.php;h=8ca205ab425f0483fcbfdb9552520c4bc8b49b40;hb=7ee3a118ebfd72862c60155b64b0bb39ab27d066;hp=bd6855145347acfab9cfd66695a29d643f374449;hpb=69bd2e54d698f32120940f80f3493479297ecf74;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MWNamespace.php b/includes/MWNamespace.php index bd68551453..8ca205ab42 100644 --- a/includes/MWNamespace.php +++ b/includes/MWNamespace.php @@ -210,6 +210,8 @@ class MWNamespace { if ( $namespaces === null || $rebuild ) { global $wgExtraNamespaces, $wgCanonicalNamespaceNames; $namespaces = array( NS_MAIN => '' ) + $wgCanonicalNamespaceNames; + // Add extension namespaces + $namespaces += ExtensionRegistry::getInstance()->getAttribute( 'ExtensionNamespaces' ); if ( is_array( $wgExtraNamespaces ) ) { $namespaces += $wgExtraNamespaces; } @@ -296,6 +298,18 @@ class MWNamespace { return $index == NS_MAIN || in_array( $index, $wgContentNamespaces ); } + /** + * Might pages in this namespace require the use of the Signature button on + * the edit toolbar? + * + * @param int $index Index to check + * @return bool + */ + public static function wantSignatures( $index ) { + global $wgExtraSignatureNamespaces; + return self::isTalk( $index ) || in_array( $index, $wgExtraSignatureNamespaces ); + } + /** * Can pages in a namespace be watched? *