Index: trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php |
— | — | @@ -24,8 +24,14 @@ |
25 | 25 | define('SF_SP_HAS_ALTERNATE_FORM', 2); |
26 | 26 | define('SF_SP_CREATES_PAGES_WITH_FORM', 3); |
27 | 27 | |
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 | +} |
30 | 36 | |
31 | 37 | // FIXME: Can be removed when new style magic words are used (introduced in r52503) |
32 | 38 | $wgHooks['LanguageGetMagic'][] = 'SFParserFunctions::languageGetMagic'; |
— | — | @@ -108,6 +114,7 @@ |
109 | 115 | // types |
110 | 116 | global $sfgFormPrinter; |
111 | 117 | $sfgFormPrinter = new StubObject( 'sfgFormPrinter', 'SFFormPrinter' ); |
| 118 | + return true; |
112 | 119 | } |
113 | 120 | |
114 | 121 | function sfgParserFunctions() { |
— | — | @@ -120,6 +127,7 @@ |
121 | 128 | } |
122 | 129 | SFParserFunctions::registerFunctions( $wgParser ); |
123 | 130 | } |
| 131 | + return true; |
124 | 132 | } |
125 | 133 | |
126 | 134 | /**********************************************/ |