mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-15 02:24:07 +00:00
Nuking fallback code for MW < 1.12 in most extensions (there's like 5 or 6 left I haven't done). Couple of points:
* 1.11 and below aren't supported anymore, so we don't need to be maintaining back-compat code for it anymore. This is why we branch extensions * The vast majority of these were using $wgParser. This defeats the purpose of ParserFirstCallInit...allowing you to use parsers other than $wgParser. All these extensions now work in any instance of the Parser, not just $wgParser
This commit is contained in:
parent
0355a57d41
commit
169e22e856
|
@ -56,11 +56,7 @@ $wgExtensionMessagesFiles['SyntaxHighlight_GeSHi'] = $dir . 'SyntaxHighlight_GeS
|
|||
$wgAutoloadClasses['SyntaxHighlight_GeSHi'] = $dir . 'SyntaxHighlight_GeSHi.class.php';
|
||||
$wgHooks['ShowRawCssJs'][] = 'SyntaxHighlight_GeSHi::viewHook';
|
||||
$wgHooks['SpecialVersionExtensionTypes'][] = 'SyntaxHighlight_GeSHi::hSpecialVersion_GeSHi';
|
||||
if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) {
|
||||
$wgHooks['ParserFirstCallInit'][] = 'efSyntaxHighlight_GeSHiSetup';
|
||||
} else {
|
||||
$wgExtensionFunctions[] = 'efSyntaxHighlight_GeSHiSetup_legacy';
|
||||
}
|
||||
$wgHooks['ParserFirstCallInit'][] = 'efSyntaxHighlight_GeSHiSetup';
|
||||
|
||||
/**
|
||||
* Register parser hook
|
||||
|
@ -70,9 +66,3 @@ function efSyntaxHighlight_GeSHiSetup( &$parser ) {
|
|||
$parser->setHook( 'syntaxhighlight', array( 'SyntaxHighlight_GeSHi', 'parserHook' ) );
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Provided for pre-1.12 MediaWiki compatibility. */
|
||||
function efSyntaxHighlight_GeSHiSetup_legacy() {
|
||||
global $wgParser;
|
||||
return efSyntaxHighlight_GeSHiSetup( $wgParser );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue