Yaron Koren has submitted this change and it was merged.

Change subject: Fix for '_str' property type going away in SMW 1.9
......................................................................


Fix for '_str' property type going away in SMW 1.9

Change-Id: I2015e09b2097b8dd29adc02ede8d44f23a54affa
---
M includes/SF_FormField.php
1 file changed, 8 insertions(+), 2 deletions(-)

Approvals:
  Yaron Koren: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/includes/SF_FormField.php b/includes/SF_FormField.php
index ba5c1ed..30982ea 100644
--- a/includes/SF_FormField.php
+++ b/includes/SF_FormField.php
@@ -190,8 +190,14 @@
                        if ( $smwgContLang != null ) {
                                $datatypeLabels = 
$smwgContLang->getDatatypeLabels();
                                $datatypeLabels['enumeration'] = 'enumeration';
-                               // TODO: link to Special:Types?
-                               $propertyTypeStr = 
$datatypeLabels[$template_field->getPropertyType()];
+
+                               $propTypeID = 
$template_field->getPropertyType();
+
+                               // Special handling for SMW 1.9
+                               if ( $propTypeID == '_str' && 
!array_key_exists( '_str', $datatypeLabels ) ) {
+                                       $propTypeID = '_txt';
+                               }
+                               $propertyTypeStr = $datatypeLabels[$propTypeID];
                        }
                        $text .= Html::rawElement( 'p', null, wfMessage( 
$propDisplayMsg, $prop_link_text, $propertyTypeStr )->parse() ) . "\n";
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/69123
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2015e09b2097b8dd29adc02ede8d44f23a54affa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>
Gerrit-Reviewer: Yaron Koren <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to