diff --git a/SyntaxHighlight_GeSHi.class.php b/SyntaxHighlight_GeSHi.class.php index f82e8b40..245888ec 100644 --- a/SyntaxHighlight_GeSHi.class.php +++ b/SyntaxHighlight_GeSHi.class.php @@ -311,4 +311,14 @@ class SyntaxHighlight_GeSHi { } return true; } + + /** + * Get the GeSHI's version information while Special:Version is read + */ + public static function hSpecialVersion_GeSHi( &$sp, &$extensionTypes ) { + global $wgExtensionCredits; + require_once( 'geshi/geshi.php' ); + $wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi']['version'] = GESHI_VERSION; + return true; + } } diff --git a/SyntaxHighlight_GeSHi.php b/SyntaxHighlight_GeSHi.php index 3f750fdc..10a99fe6 100644 --- a/SyntaxHighlight_GeSHi.php +++ b/SyntaxHighlight_GeSHi.php @@ -55,6 +55,7 @@ $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'; if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { $wgHooks['ParserFirstCallInit'][] = 'efSyntaxHighlight_GeSHiSetup'; } else {