From: Jeroen De Dauw Date: Mon, 9 Aug 2010 00:21:09 +0000 (+0000) Subject: Made base extension types accessible for other code X-Git-Tag: 1.31.0-rc.0~35592 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=8be2cf67a83c09e3e234423e1494db3a4e54a159;p=lhc%2Fweb%2Fwiklou.git Made base extension types accessible for other code --- diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index f718e103f5..0c2b469c99 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -197,6 +197,24 @@ class SpecialVersion extends SpecialPage { return $version; } + /** + * Returns an array with the base extension types. + * Type is stored as array key, the message as array value. + * + * @since 1.17 + * + * @return array + */ + public static function getBaseExtensionTypes() { + return array( + 'specialpage' => wfMsg( 'version-specialpages' ), + 'parserhook' => wfMsg( 'version-parserhooks' ), + 'variable' => wfMsg( 'version-variables' ), + 'media' => wfMsg( 'version-mediahandlers' ), + 'other' => wfMsg( 'version-other' ), + ); + } + /** * Generate wikitext showing extensions name, URL, author and description. * @@ -209,13 +227,7 @@ class SpecialVersion extends SpecialPage { return ''; } - $extensionTypes = array( - 'specialpage' => wfMsg( 'version-specialpages' ), - 'parserhook' => wfMsg( 'version-parserhooks' ), - 'variable' => wfMsg( 'version-variables' ), - 'media' => wfMsg( 'version-mediahandlers' ), - 'other' => wfMsg( 'version-other' ), - ); + $extensionTypes = self::getBaseExtensionTypes(); wfRunHooks( 'SpecialVersionExtensionTypes', array( &$this, &$extensionTypes ) );