mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-15 02:24:07 +00:00
tweak for r52546, use require_once() to make the class file only load once.
This commit is contained in:
parent
261fb2e5d4
commit
b7179c44cf
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue