r55819 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55818‎ | r55819 | r55820 >
Date:13:30, 4 September 2009
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Added $wgHooks['ParserFirstCallInit']
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php
@@ -24,8 +24,14 @@
2525 define('SF_SP_HAS_ALTERNATE_FORM', 2);
2626 define('SF_SP_CREATES_PAGES_WITH_FORM', 3);
2727
28 -$wgExtensionFunctions[] = 'sfgSetupExtension';
29 -$wgExtensionFunctions[] = 'sfgParserFunctions';
 28+if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) {
 29+ $wgHooks['ParserFirstCallInit'][] = 'sfgSetupExtension';
 30+ $wgHooks['ParserFirstCallInit'][] = 'sfgParserFunctions';
 31+} else {
 32+ // Legacy support
 33+ $wgExtensionFunctions[] = 'sfgSetupExtension';
 34+ $wgExtensionFunctions[] = 'sfgParserFunctions';
 35+}
3036
3137 // FIXME: Can be removed when new style magic words are used (introduced in r52503)
3238 $wgHooks['LanguageGetMagic'][] = 'SFParserFunctions::languageGetMagic';
@@ -108,6 +114,7 @@
109115 // types
110116 global $sfgFormPrinter;
111117 $sfgFormPrinter = new StubObject( 'sfgFormPrinter', 'SFFormPrinter' );
 118+ return true;
112119 }
113120
114121 function sfgParserFunctions() {
@@ -120,6 +127,7 @@
121128 }
122129 SFParserFunctions::registerFunctions( $wgParser );
123130 }
 131+ return true;
124132 }
125133
126134 /**********************************************/

Status & tagging log