r112643 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112642‎ | r112643 | r112644 >
Date:21:13, 28 February 2012
Author:foxtrott
Status:deferred
Tags:
Comment:
bugfix (ok text and error text parsed twice for autoedit); removed unused global
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php
@@ -191,7 +191,6 @@
192192 }
193193
194194 static function renderFormInput ( &$parser ) {
195 - global $wgVersion;
196195
197196 $params = func_get_args();
198197 array_shift( $params ); // don't need the parser
@@ -551,10 +550,17 @@
552551 $inQueryArr = SFUtils::array_merge_recursive_distinct( $inQueryArr, $arr );
553552 break;
554553
 554+ case 'ok text':
 555+ case 'error text':
 556+ // do not parse ok text or error text yet. Will be parsed on api call
 557+ $arr = array( $key => $value );
 558+ $inQueryArr = SFUtils::array_merge_recursive_distinct( $inQueryArr, $arr );
 559+ break;
 560+
555561 default :
556562
557 - $value = urlencode( $parser->recursiveTagParse( $value ) );
558 - parse_str( "$key=$value", $arr );
 563+ $value = $parser->recursiveTagParse( $value );
 564+ $arr = array( $key => $value );
559565 $inQueryArr = SFUtils::array_merge_recursive_distinct( $inQueryArr, $arr );
560566 }
561567 }