r62281 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62280‎ | r62281 | r62282 >
Date:00:33, 11 February 2010
Author:yaron
Status:deferred
Tags:
Comment:
Fixed handling for #formlink using old, unnamed-parameters scheme; and handling of query strings with unnamed parameters for both #formlink and #forminput
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php
@@ -153,15 +153,13 @@
154154 elseif ($param_name == 'query string')
155155 $inQueryStr = $value;
156156 elseif ($i == 0)
157 - $inFormName = $value;
 157+ $inFormName = $param;
158158 elseif ($i == 1)
159 - $inSize = $value;
 159+ $inLinkStr = $param;
160160 elseif ($i == 2)
161 - $inLinkStr = $value;
 161+ $inLinkType = $param;
162162 elseif ($i == 3)
163 - $inLinkType = $value;
164 - elseif ($i == 4)
165 - $inQueryStr = $value;
 163+ $inQueryStr = $param;
166164 }
167165
168166 $ad = SpecialPage::getPage('AddData');
@@ -174,6 +172,7 @@
175173 $hidden_inputs = "";
176174 $query_components = explode('&', $inQueryStr);
177175 foreach ($query_components as $query_component) {
 176+ $query_component = urldecode($query_component);
178177 $var_and_val = explode('=', $query_component);
179178 if (count($var_and_val) == 2) {
180179 $hidden_inputs .= '<input type="hidden" name="' . $var_and_val[0] . '" value="' . $var_and_val[1] . '" /> ';
@@ -234,15 +233,15 @@
235234 $autocompletion_type = 'namespace';
236235 }
237236 elseif ($i == 0)
238 - $inFormName = $value;
 237+ $inFormName = $param;
239238 elseif ($i == 1)
240 - $inSize = $value;
 239+ $inSize = $param;
241240 elseif ($i == 2)
242 - $inValue = $value;
 241+ $inValue = $param;
243242 elseif ($i == 3)
244 - $inButtonStr = $value;
 243+ $inButtonStr = $param;
245244 elseif ($i == 4)
246 - $inQueryStr = $value;
 245+ $inQueryStr = $param;
247246 }
248247
249248 $input_num = 1;

Status & tagging log