From: Jeroen De Dauw Date: Mon, 9 Aug 2010 06:16:05 +0000 (+0000) Subject: Added ExtensionTypes hook that can be called from static context and deprecated the... X-Git-Tag: 1.31.0-rc.0~35590 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=eae4ba8249eb3ccfd9e12b0c66d3895bdc33d58e;p=lhc%2Fweb%2Fwiklou.git Added ExtensionTypes hook that can be called from static context and deprecated the old one. --- diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index ac4ade3fdc..cca95a0e08 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -210,13 +210,17 @@ class SpecialVersion extends SpecialPage { * @return array */ public static function getExtensionTypes() { - return array( + $extensionTypes = array( 'specialpage' => wfMsg( 'version-specialpages' ), 'parserhook' => wfMsg( 'version-parserhooks' ), 'variable' => wfMsg( 'version-variables' ), 'media' => wfMsg( 'version-mediahandlers' ), 'other' => wfMsg( 'version-other' ), ); + + wfRunHooks( 'ExtensionTypes', array( &$extensionTypes ) ); + + return $extensionTypes; } /** @@ -233,6 +237,9 @@ class SpecialVersion extends SpecialPage { $extensionTypes = self::getExtensionTypes(); + /** + * @deprecated as of 1.17, use hook ExtensionTypes instead. + */ wfRunHooks( 'SpecialVersionExtensionTypes', array( &$this, &$extensionTypes ) ); $out = Xml::element( 'h2', array( 'id' => 'mw-version-ext' ), wfMsg( 'version-extensions' ) ) .