mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-15 02:24:07 +00:00
Follow up to r70741
This commit is contained in:
parent
be605403b0
commit
4bc3dbd009
|
@ -313,12 +313,20 @@ class SyntaxHighlight_GeSHi {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the GeSHI's version information while Special:Version is read
|
||||
* Get the GeSHI's version information while Special:Version is read.
|
||||
*/
|
||||
public static function hSpecialVersion_GeSHi( &$sp, &$extensionTypes ) {
|
||||
public static function hSpecialVersion_GeSHi( &$extensionTypes ) {
|
||||
global $wgExtensionCredits;
|
||||
self::initialise();
|
||||
$wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi']['version'] = GESHI_VERSION;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SyntaxHighlight_GeSHi::hSpecialVersion_GeSHi
|
||||
*/
|
||||
public static function hOldSpecialVersion_GeSHi( &$sp, &$extensionTypes ) {
|
||||
return self::hSpecialVersion_GeSHi( $extensionTypes );
|
||||
}
|
||||
|
||||
}
|
|
@ -52,9 +52,17 @@ $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';
|
||||
$wgHooks['ParserFirstCallInit'][] = 'efSyntaxHighlight_GeSHiSetup';
|
||||
|
||||
if ( version_compare( $wgVersion, '1.17alpha', '>=' ) ) {
|
||||
// For MediaWiki 1.17 alpha and later.
|
||||
$wgHooks['ExtensionTypes'][] = 'SyntaxHighlight_GeSHi::hSpecialVersion_GeSHi';
|
||||
}
|
||||
else {
|
||||
// For pre-MediaWiki 1.17 alpha.
|
||||
$wgHooks['SpecialVersionExtensionTypes'][] = 'SyntaxHighlight_GeSHi::hOldSpecialVersion_GeSHi';
|
||||
}
|
||||
|
||||
/**
|
||||
* Register parser hook
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue