tweak for r52546, use require_once() to make the class file only load once.

This commit is contained in:
Shinjiman 2009-06-29 16:29:43 +00:00
parent 261fb2e5d4
commit b7179c44cf
2 changed files with 2 additions and 2 deletions

View file

@ -306,7 +306,7 @@ class SyntaxHighlight_GeSHi {
if( !self::$initialised ) { if( !self::$initialised ) {
wfLoadExtensionMessages( 'SyntaxHighlight_GeSHi' ); wfLoadExtensionMessages( 'SyntaxHighlight_GeSHi' );
if( !class_exists( 'GeSHi' ) ) if( !class_exists( 'GeSHi' ) )
require( 'geshi/geshi.php' ); require_once( 'geshi/geshi.php' );
self::$initialised = true; self::$initialised = true;
} }
return true; return true;

View file

@ -62,7 +62,7 @@ if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) {
} }
if ( file_exists( $dir . 'geshi/geshi.php' ) ) { if ( file_exists( $dir . 'geshi/geshi.php' ) ) {
require( 'geshi/geshi.php' ); require_once( 'geshi/geshi.php' );
$wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi']['version'] = GESHI_VERSION; $wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi']['version'] = GESHI_VERSION;
} }