X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FMWNamespace.php;h=731b62e0362656f9d7fd18b462c0bcf1fe8f9380;hb=298e55a5b7de57f129735f0c103e4d951c550a39;hp=392f5582f85ac4bd54d03e6f7ef39b5aff5b463b;hpb=b88d4628dcde8babb4990fc4f622673e3f275650;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MWNamespace.php b/includes/MWNamespace.php index 392f5582f8..731b62e036 100644 --- a/includes/MWNamespace.php +++ b/includes/MWNamespace.php @@ -72,7 +72,7 @@ class MWNamespace { /** * @since 1.20 */ - wfRunHooks( 'NamespaceIsMovable', array( $index, &$result ) ); + Hooks::run( 'NamespaceIsMovable', array( $index, &$result ) ); return $result; } @@ -213,7 +213,7 @@ class MWNamespace { if ( is_array( $wgExtraNamespaces ) ) { $namespaces += $wgExtraNamespaces; } - wfRunHooks( 'CanonicalNamespaces', array( &$namespaces ) ); + Hooks::run( 'CanonicalNamespaces', array( &$namespaces ) ); } return $namespaces; } @@ -296,6 +296,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? *