r60308 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60307‎ | r60308 | r60309 >
Date:05:59, 23 December 2009
Author:yaron
Status:deferred
Tags:
Comment:
Removed support for SMW < 1.4
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_TemplateField.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_TemplateField.inc
@@ -55,17 +55,10 @@
5656 if ($proptitle === NULL)
5757 return;
5858 $store = smwfGetStore();
59 - if (class_exists('SMWPropertyValue')) {
60 - $types = $store->getPropertyValues($proptitle, SMWPropertyValue::makeUserProperty("Has type"));
61 - // this returns an array of objects
62 - $allowed_values = $store->getPropertyValues($proptitle, SMWPropertyValue::makeUserProperty("Allows value"));
63 - $label_formats = $store->getPropertyValues($proptitle, SMWPropertyValue::makeUserProperty("Has field label format"));
64 - } else {
65 - $types = $store->getSpecialValues($proptitle, SMW_SP_HAS_TYPE);
66 - // this returns an array of objects
67 - $allowed_values = $store->getSpecialValues($proptitle, SMW_SP_POSSIBLE_VALUE);
68 - $label_formats = $store->getSpecialValues($proptitle, SF_SP_HAS_FIELD_LABEL_FORMAT);
69 - }
 59+ $types = $store->getPropertyValues($proptitle, SMWPropertyValue::makeUserProperty("Has type"));
 60+ // this returns an array of objects
 61+ $allowed_values = $store->getPropertyValues($proptitle, SMWPropertyValue::makeUserProperty("Allows value"));
 62+ $label_formats = $store->getPropertyValues($proptitle, SMWPropertyValue::makeUserProperty("Has field label format"));
7063 // TODO - need handling for the case of more than one type
7164 if (count($types) > 0)
7265 $this->field_type = $types[0]->getWikiValue();

Status & tagging log