r108516 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108515‎ | r108516 | r108517 >
Date:16:26, 10 January 2012
Author:yaron
Status:deferred (Comments)
Tags:semanticforms 
Comment:
Removed 'LanguageGetMagic' code - no longer needed, since MW < 1.16 support was removed
Modified paths:
  • /trunk/extensions/SemanticForms/SemanticForms.php (modified) (history)
  • /trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/SemanticForms.php
@@ -78,8 +78,6 @@
7979
8080 $wgExtensionFunctions[] = 'sffSetupExtension';
8181
82 -// FIXME: Can be removed when new style magic words are used (introduced in r52503)
83 -$wgHooks['LanguageGetMagic'][] = 'SFParserFunctions::languageGetMagic';
8482 $wgHooks['LinkEnd'][] = 'SFFormLinker::setBrokenLink';
8583 $wgHooks['UnknownAction'][] = 'SFFormEditTab::displayForm';
8684 // 'SkinTemplateNavigation' replaced 'SkinTemplateTabs' in the Vector skin
Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php
@@ -141,21 +141,7 @@
142142 return true;
143143 }
144144
145 - // FIXME: Can be removed when new style magic words are used (introduced in r52503)
146 - static function languageGetMagic( &$magicWords, $langCode = "en" ) {
147 - switch ( $langCode ) {
148 - default:
149 - $magicWords['forminput'] = array ( 0, 'forminput' );
150 - $magicWords['formlink'] = array ( 0, 'formlink' );
151 - $magicWords['arraymap'] = array ( 0, 'arraymap' );
152 - $magicWords['arraymaptemplate'] = array ( 0, 'arraymaptemplate' );
153 - $magicWords['autoedit'] = array( 0, 'autoedit' );
154 - }
155 - return true;
156 - }
157 -
158145 static function renderFormLink ( &$parser ) {
159 -
160146 global $wgVersion;
161147
162148 $params = func_get_args();
@@ -168,19 +154,15 @@
169155 // - support unlabelled params, for backwards compatibility
170156 // - parse and sanitize all parameter values
171157 foreach ( $params as $i => $param ) {
172 -
173158 $elements = explode( '=', $param, 2 );
174159
175160 // set param_name and value
176161 if ( count( $elements ) > 1 ) {
177 -
178162 $param_name = trim( $elements[0] );
179163
180164 // parse (and sanitize) parameter values
181165 $value = trim( $parser->recursiveTagParse( $elements[1] ) );
182 -
183166 } else {
184 -
185167 $param_name = null;
186168
187169 // parse (and sanitize) parameter values

Follow-up revisions

RevisionCommit summaryAuthorDate
r108558Follow-up to r108516 - after LanguageGetMagic hook was removed, a call to SF_...yaron22:59, 10 January 2012

Comments

#Comment by Nikerabbit (talk | contribs)   18:42, 10 January 2012

Apparently something is needed:

[10-Jan-2012 18:41:35] "" is not a valid magic word for "autoedit"
(129 lines skipped) 2012-01-10 18:40:43  mediawiki-bw_: Error: invalid magic word 'autoedit'
#Comment by Yaron Koren (talk | contribs)   02:11, 11 January 2012

Thanks - I believe this is fixed in SVN now.

Status & tagging log