r60306 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60305‎ | r60306 | r60307 >
Date:05:28, 23 December 2009
Author:yaron
Status:deferred
Tags:
Comment:
Changed number of fields to 25, replaced some hardcoded HTML with Xml class functions
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_CreateClass.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_CreateClass.php
@@ -39,13 +39,13 @@
4040 $form_name = trim($wgRequest->getVal("form_name"));
4141 $category_name = trim($wgRequest->getVal("category_name"));
4242 if ($template_name == '' | $form_name == '' || $category_name == '') {
43 - $text = "<p>" . wfMsg('sf_createclass_missingvalues') . "</p>";
 43+ $text = Xml::element('p', null, wfMsg('sf_createclass_missingvalues'));
4444 $wgOut->addHTML($text);
4545 return;
4646 }
4747 $fields = array();
4848 $jobs = array();
49 - for ($i = 1; $i <= 20; $i++) {
 49+ for ($i = 1; $i <= 25; $i++) {
5050 # cycle through the query values, setting the appropriate local variables
5151 $property_name = trim($wgRequest->getVal("property_name_$i"));
5252 if ($property_name != '') {
@@ -93,7 +93,7 @@
9494 $jobs[] = new SFCreatePageJob( $category_title, $params );
9595 Job::batchInsert( $jobs );
9696
97 - $text = "<p>" . wfMsg('sf_createclass_success') . "</p>";
 97+ $text = Xml::element('p', null, wfMsg('sf_createclass_success'));
9898 $wgOut->addHTML($text);
9999 return;
100100 }
@@ -144,7 +144,7 @@
145145 </tr>
146146
147147 END;
148 - for ($i = 1; $i <= 20; $i++) {
 148+ for ($i = 1; $i <= 25; $i++) {
149149 $text .=<<<END
150150 <tr>
151151 <td>$i. <input type="text" size="25" name="property_name_$i" /></td>
@@ -157,6 +157,7 @@
158158 $text .= " <option>$label</option>\n";
159159 }
160160 $text .=<<<END
 161+ </select>
161162 </td>
162163 <td><input type="text" size="25" name="allowed_values_$i" /></td>
163164 <td><input type="checkbox" name="is_list_$i" /></td>

Status & tagging log