From 169e22e85617a32a40837d887bc4ef0f7c0a2a76 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 4 Sep 2009 22:22:12 +0000 Subject: [PATCH] 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 --- SyntaxHighlight_GeSHi.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/SyntaxHighlight_GeSHi.php b/SyntaxHighlight_GeSHi.php index 32e94eaf..dd587e34 100644 --- a/SyntaxHighlight_GeSHi.php +++ b/SyntaxHighlight_GeSHi.php @@ -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 ); -}