r43649 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43648‎ | r43649 | r43650 >
Date:22:22, 17 November 2008
Author:yaron
Status:deferred
Tags:
Comment:
Added support for SMW 1.4
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_CreateProperty.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_CreateProperty.php
@@ -34,8 +34,13 @@
3535 $text = wfMsgForContent('sf_property_isrelation');
3636 } else {
3737 global $smwgContLang;
38 - $specprops = $smwgContLang->getSpecialPropertiesArray();
39 - $type_tag = "[[{$specprops[SMW_SP_HAS_TYPE]}::$property_type]]";
 38+ if (class_exists('SMWPropertyValue')) {
 39+ $has_type_prop = SMWPropertyValue::makeUserProperty("Has type");
 40+ $type_tag = "[[{$has_type_prop->getWikiValue()}::$property_type]]";
 41+ } else {
 42+ $specprops = $smwgContLang->getSpecialPropertiesArray();
 43+ $type_tag = "[[{$specprops[SMW_SP_HAS_TYPE]}::$property_type]]";
 44+ }
4045 $text = wfMsgForContent('sf_property_isproperty', $type_tag);
4146 if ($allowed_values_str != '') {
4247 $text .= "\n\n" . wfMsgForContent('sf_property_allowedvals');

Status & tagging log