Yaron Koren has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/69123


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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms 
refs/changes/23/69123/1

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: newchange
Gerrit-Change-Id: I2015e09b2097b8dd29adc02ede8d44f23a54affa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>

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

Reply via email to