http://www.mediawiki.org/wiki/Special:Code/MediaWiki/70511
Revision: 70511 Author: siebrand Date: 2010-08-05 18:08:03 +0000 (Thu, 05 Aug 2010) Log Message: ----------- Removed most checks for MW_SUPPORTS_PARSERFIRSTCALLINIT introduced in MediaWiki 1.12.0 (released 2008-03-20). Modified Paths: -------------- trunk/extensions/AmazonPlus/AmazonPlus.php trunk/extensions/Cite/Cite.php trunk/extensions/ConditionalShowSection/ConditionalShowSection.php trunk/extensions/ConditionalShowSection/README trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php trunk/extensions/FBConnect/FBConnect.php trunk/extensions/HideNamespace/HideNamespace.php trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php trunk/extensions/SlippyMap/SlippyMap.php Modified: trunk/extensions/AmazonPlus/AmazonPlus.php =================================================================== --- trunk/extensions/AmazonPlus/AmazonPlus.php 2010-08-05 17:15:39 UTC (rev 70510) +++ trunk/extensions/AmazonPlus/AmazonPlus.php 2010-08-05 18:08:03 UTC (rev 70511) @@ -66,12 +66,7 @@ $wgExtensionMessagesFiles['AmazonPlus'] = dirname( __FILE__ ) . '/AmazonPlus.i18n.php'; -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'efAmazonPlusSetup'; -} else { - $wgExtensionFunctions[] = 'efAmazonPlusSetup'; -} - +$wgHooks['ParserFirstCallInit'][] = 'efAmazonPlusSetup'; $wgHooks['BeforePageDisplay'][] = 'efAmazonPlusJavascript'; $wgAmazonPlusJSVersion = 1; # Bump the version number every time you change AmazonPlus.js Modified: trunk/extensions/Cite/Cite.php =================================================================== --- trunk/extensions/Cite/Cite.php 2010-08-05 17:15:39 UTC (rev 70510) +++ trunk/extensions/Cite/Cite.php 2010-08-05 18:08:03 UTC (rev 70511) @@ -17,11 +17,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later */ -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'wfCite'; -} else { - $wgExtensionFunctions[] = 'wfCite'; -} +$wgHooks['ParserFirstCallInit'][] = 'wfCite'; $wgExtensionCredits['parserhook'][] = array( 'path' => __FILE__, @@ -53,4 +49,3 @@ } /*...@-*/ - Modified: trunk/extensions/ConditionalShowSection/ConditionalShowSection.php =================================================================== --- trunk/extensions/ConditionalShowSection/ConditionalShowSection.php 2010-08-05 17:15:39 UTC (rev 70510) +++ trunk/extensions/ConditionalShowSection/ConditionalShowSection.php 2010-08-05 18:08:03 UTC (rev 70511) @@ -32,11 +32,7 @@ $dir = dirname( __FILE__ ) . '/'; $wgExtensionMessagesFiles['ConditionalShowSection'] = $dir . 'ConditionalShowSection.i18n.php'; -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'wfConditionalShowSection'; -} else { // Otherwise do things the old fashioned way - $wgExtensionFunctions[] = 'wfConditionalShowSection'; -} +$wgHooks['ParserFirstCallInit'][] = 'wfConditionalShowSection'; function wfConditionalShowSection() { global $wgParser; Modified: trunk/extensions/ConditionalShowSection/README =================================================================== --- trunk/extensions/ConditionalShowSection/README 2010-08-05 17:15:39 UTC (rev 70510) +++ trunk/extensions/ConditionalShowSection/README 2010-08-05 18:08:03 UTC (rev 70511) @@ -37,7 +37,7 @@ |imagesize = |version = 1.5 |update = 2009-09-10 -|mediawiki = tested on 1.8.2, 1.9.3, 1.10, 1.14, 1.15, 1.16A +|mediawiki = tested on 1.14, 1.15, 1.16A |php = |license = GNU General Public Licence 2.0 |download = [http://wiki.jldupont.com/Extension:ConditionalContent http version <1.5] Modified: trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php =================================================================== --- trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php 2010-08-05 17:15:39 UTC (rev 70510) +++ trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php 2010-08-05 18:08:03 UTC (rev 70511) @@ -23,13 +23,8 @@ //default variables that should be set in LocalSettings $wgStompServer = ""; -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'efStompSetup'; -} else { // Otherwise do things the old fashioned way - $wgExtensionFunctions[] = 'efStompSetup'; -} +$wgHooks['ParserFirstCallInit'][] = 'efStompSetup'; - /* * Create <donate /> tag to include landing page donation form */ Modified: trunk/extensions/FBConnect/FBConnect.php =================================================================== --- trunk/extensions/FBConnect/FBConnect.php 2010-08-05 17:15:39 UTC (rev 70510) +++ trunk/extensions/FBConnect/FBConnect.php 2010-08-05 18:08:03 UTC (rev 70511) @@ -44,7 +44,7 @@ /* * FBConnect version. */ -define( 'MEDIAWIKI_FBCONNECT_VERSION', '2.0.2' ); +define( 'MEDIAWIKI_FBCONNECT_VERSION', '2.1.0' ); /* * Add information about this extension to Special:Version. @@ -153,13 +153,6 @@ } else { self::$fbOnLoginJs = "window.location.reload(true);"; } - - // ParserFirstCallInit was introduced in modern (1.12+) MW versions so as to - // avoid unstubbing $wgParser on setHook() too early, as per r35980 - if (!defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' )) { - global $wgParser; - wfRunHooks( 'ParserFirstCallInit', $wgParser ); - } } /** Modified: trunk/extensions/HideNamespace/HideNamespace.php =================================================================== --- trunk/extensions/HideNamespace/HideNamespace.php 2010-08-05 17:15:39 UTC (rev 70510) +++ trunk/extensions/HideNamespace/HideNamespace.php 2010-08-05 18:08:03 UTC (rev 70511) @@ -26,7 +26,7 @@ 'name' => "HideNamespace", 'description' => "Hides namespace in the header and title when a page is in specified namespace or when the <code><nowiki>{{#hidens:}}</nowiki></code> parser function is called.", 'descriptionmsg' => "hidens-desc", - 'version' => "1.3", + 'version' => "1.4", 'author' => 'Matěj Grabovský', 'url' => "http://www.mediawiki.org/wiki/Extension:HideNamespace", ); @@ -39,18 +39,7 @@ // Register hooks $wgHooks['ArticleViewHeader'][] = array( $extHidensObj, 'onArticleViewHeader' ); $wgHooks['BeforePageDisplay'][] = array( $extHidensObj, 'onBeforePageDisplay' ); - - // If we support ParserFirstCallInit, hook our function to register PF hooks with it - if( defined('MW_SUPPORTS_PARSERFIRSTCALLINIT') ) { - $wgHooks['ParserFirstCallInit'][] = array( $extHidensObj, 'RegisterParser' ); - - // Else manualy unstub Parser and call our function - } else { - if( class_exists( 'StubObject' ) && !StubObject::isRealObject( $wgParser ) ) { - $wgParser->_unstub(); - } - $extHidensObj->RegisterParser( $wgParser ); - } + $wgHooks['ParserFirstCallInit'][] = array( $extHidensObj, 'RegisterParser' ); } class ExtensionHideNamespace { Modified: trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php =================================================================== --- trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php 2010-08-05 17:15:39 UTC (rev 70510) +++ trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php 2010-08-05 18:08:03 UTC (rev 70511) @@ -26,7 +26,6 @@ define( 'SF_SP_HAS_FIELD_LABEL_FORMAT', 5 ); $wgExtensionFunctions[] = 'sfgSetupExtension'; -$wgExtensionFunctions[] = 'sfgParserFunctions'; // FIXME: Can be removed when new style magic words are used (introduced in r52503) $wgHooks['LanguageGetMagic'][] = 'SFParserFunctions::languageGetMagic'; @@ -42,6 +41,7 @@ $wgHooks['smwInitProperties'][] = 'SFUtils::initProperties'; $wgHooks['AdminLinks'][] = 'sffAddToAdminLinks'; $wgHooks['ParserBeforeStrip'][] = 'SFUtils::cacheFormDefinition'; +$wgHooks['ParserFirstCallInit'][] = 'SFParserFunctions::registerFunctions'; $wgAPIModules['sfautocomplete'] = 'SFAutocompleteAPI'; @@ -116,18 +116,6 @@ $sfgFormPrinter = new StubObject( 'sfgFormPrinter', 'SFFormPrinter' ); } -function sfgParserFunctions() { - global $wgHooks, $wgParser; - if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'SFParserFunctions::registerFunctions'; - } else { - if ( class_exists( 'StubObject' ) && !StubObject::isRealObject( $wgParser ) ) { - $wgParser->_unstub(); - } - SFParserFunctions::registerFunctions( $wgParser ); - } -} - /**********************************************/ /***** namespace settings *****/ /**********************************************/ Modified: trunk/extensions/SlippyMap/SlippyMap.php =================================================================== --- trunk/extensions/SlippyMap/SlippyMap.php 2010-08-05 17:15:39 UTC (rev 70510) +++ trunk/extensions/SlippyMap/SlippyMap.php 2010-08-05 18:08:03 UTC (rev 70511) @@ -47,12 +47,7 @@ $wgParserTestFiles[] = $dir . '/slippyMapParserTests.txt'; /* Parser hook */ -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { - $wgHooks['ParserFirstCallInit'][] = 'wfSlippyMapHook'; -} else { - // Legacy support - $wgExtensionFunctions[] = 'wfSlippyMapHook'; -} +$wgHooks['ParserFirstCallInit'][] = 'wfSlippyMapHook'; function wfSlippyMapHook() { new SlippyMapHook; @@ -156,4 +151,3 @@ * see see the static map and nothing else. */ $wgSlippyMapAutoLoadMaps = false; - _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs