From 261fb2e5d428ba61a6695df012a510d061b16f96 Mon Sep 17 00:00:00 2001 From: Shinjiman Date: Mon, 29 Jun 2009 15:07:40 +0000 Subject: [PATCH] show the version information of GeSHi currently using, only show the version when the required geshi.php was found. --- SyntaxHighlight_GeSHi.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SyntaxHighlight_GeSHi.php b/SyntaxHighlight_GeSHi.php index 3f750fdc..05352adf 100644 --- a/SyntaxHighlight_GeSHi.php +++ b/SyntaxHighlight_GeSHi.php @@ -61,6 +61,11 @@ if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { $wgExtensionFunctions[] = 'efSyntaxHighlight_GeSHiSetup'; } +if ( file_exists( $dir . 'geshi/geshi.php' ) ) { + require( 'geshi/geshi.php' ); + $wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi']['version'] = GESHI_VERSION; +} + /** * Register parser hook */