r60199 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60198‎ | r60199 | r60200 >
Date:03:56, 18 December 2009
Author:yaron
Status:deferred
Tags:
Comment:
Bug fix for dantman's changes in r59236
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_TemplateField.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_TemplateField.inc
@@ -70,12 +70,6 @@
7171 if (count($types) > 0)
7272 $this->field_type = $types[0]->getWikiValue();
7373
74 - // HACK - if there were any possible values, set the field
75 - // type to be 'enumeration', regardless of what the actual type is
76 - if (count($this->possible_values) > 0) {
77 - $this->field_type = 'enumeration';
78 - }
79 -
8074 foreach ($allowed_values as $value) {
8175 // HTML-unencode each value
8276 $wiki_value = html_entity_decode($value->getWikiValue());
@@ -88,6 +82,12 @@
8983 $this->value_labels[$wiki_value] = html_entity_decode($label_value->getWikiValue());
9084 }
9185 }
 86+
 87+ // HACK - if there were any possible values, set the field
 88+ // type to be 'enumeration', regardless of what the actual type is
 89+ if (count($this->possible_values) > 0) {
 90+ $this->field_type = 'enumeration';
 91+ }
9292 }
9393
9494 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r59236Implement labels for dropdowns/listboxes/checkboxes/radios using a [[Has fiel...dantman05:39, 19 November 2009

Status & tagging log