Follow up to r70741

This commit is contained in:
Jeroen De Dauw 2010-08-09 06:25:28 +00:00
parent be605403b0
commit 4bc3dbd009
2 changed files with 20 additions and 4 deletions

View file

@ -313,12 +313,20 @@ class SyntaxHighlight_GeSHi {
}
/**
* Get the GeSHI's version information while Special:Version is read
* Get the GeSHI's version information while Special:Version is read.
*/
public static function hSpecialVersion_GeSHi( &$sp, &$extensionTypes ) {
public static function hSpecialVersion_GeSHi( &$extensionTypes ) {
global $wgExtensionCredits;
self::initialise();
$wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi']['version'] = GESHI_VERSION;
return true;
}
}
/**
* @see SyntaxHighlight_GeSHi::hSpecialVersion_GeSHi
*/
public static function hOldSpecialVersion_GeSHi( &$sp, &$extensionTypes ) {
return self::hSpecialVersion_GeSHi( $extensionTypes );
}
}

View file

@ -52,9 +52,17 @@ $dir = dirname(__FILE__) . '/';
$wgExtensionMessagesFiles['SyntaxHighlight_GeSHi'] = $dir . 'SyntaxHighlight_GeSHi.i18n.php';
$wgAutoloadClasses['SyntaxHighlight_GeSHi'] = $dir . 'SyntaxHighlight_GeSHi.class.php';
$wgHooks['ShowRawCssJs'][] = 'SyntaxHighlight_GeSHi::viewHook';
$wgHooks['SpecialVersionExtensionTypes'][] = 'SyntaxHighlight_GeSHi::hSpecialVersion_GeSHi';
$wgHooks['ParserFirstCallInit'][] = 'efSyntaxHighlight_GeSHiSetup';
if ( version_compare( $wgVersion, '1.17alpha', '>=' ) ) {
// For MediaWiki 1.17 alpha and later.
$wgHooks['ExtensionTypes'][] = 'SyntaxHighlight_GeSHi::hSpecialVersion_GeSHi';
}
else {
// For pre-MediaWiki 1.17 alpha.
$wgHooks['SpecialVersionExtensionTypes'][] = 'SyntaxHighlight_GeSHi::hOldSpecialVersion_GeSHi';
}
/**
* Register parser hook
*/