Revision: 43649
Author: yaron
Date: 2008-11-17 22:22:06 +0000 (Mon, 17 Nov 2008)
Log Message:
-----------
Added support for SMW 1.4
Modified Paths:
--------------
trunk/extensions/SemanticForms/specials/SF_CreateProperty.php
Modified: trunk/extensions/SemanticForms/specials/SF_CreateProperty.php
===================================================================
--- trunk/extensions/SemanticForms/specials/SF_CreateProperty.php
2008-11-17 22:19:46 UTC (rev 43648)
+++ trunk/extensions/SemanticForms/specials/SF_CreateProperty.php
2008-11-17 22:22:06 UTC (rev 43649)
@@ -34,8 +34,13 @@
$text = wfMsgForContent('sf_property_isrelation');
} else {
global $smwgContLang;
- $specprops = $smwgContLang->getSpecialPropertiesArray();
- $type_tag = "[[{$specprops[SMW_SP_HAS_TYPE]}::$property_type]]";
+ if (class_exists('SMWPropertyValue')) {
+ $has_type_prop =
SMWPropertyValue::makeUserProperty("Has type");
+ $type_tag =
"[[{$has_type_prop->getWikiValue()}::$property_type]]";
+ } else {
+ $specprops = $smwgContLang->getSpecialPropertiesArray();
+ $type_tag =
"[[{$specprops[SMW_SP_HAS_TYPE]}::$property_type]]";
+ }
$text = wfMsgForContent('sf_property_isproperty', $type_tag);
if ($allowed_values_str != '') {
$text .= "\n\n" .
wfMsgForContent('sf_property_allowedvals');
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs