Index: trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php |
— | — | @@ -55,6 +55,7 @@ |
56 | 56 | $wgExtensionMessagesFiles['SyntaxHighlight_GeSHi'] = $dir . 'SyntaxHighlight_GeSHi.i18n.php'; |
57 | 57 | $wgAutoloadClasses['SyntaxHighlight_GeSHi'] = $dir . 'SyntaxHighlight_GeSHi.class.php'; |
58 | 58 | $wgHooks['ShowRawCssJs'][] = 'SyntaxHighlight_GeSHi::viewHook'; |
| 59 | +$wgHooks['SpecialVersionExtensionTypes'][] = 'SyntaxHighlight_GeSHi::hSpecialVersion_GeSHi'; |
59 | 60 | if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { |
60 | 61 | $wgHooks['ParserFirstCallInit'][] = 'efSyntaxHighlight_GeSHiSetup'; |
61 | 62 | } else { |
Index: trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php |
— | — | @@ -311,4 +311,14 @@ |
312 | 312 | } |
313 | 313 | return true; |
314 | 314 | } |
| 315 | + |
| 316 | + /** |
| 317 | + * Get the GeSHI's version information while Special:Version is read |
| 318 | + */ |
| 319 | + public static function hSpecialVersion_GeSHi( &$sp, &$extensionTypes ) { |
| 320 | + global $wgExtensionCredits; |
| 321 | + require_once( 'geshi/geshi.php' ); |
| 322 | + $wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi']['version'] = GESHI_VERSION; |
| 323 | + return true; |
| 324 | + } |
315 | 325 | } |