Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/64928
Change subject: More fixes for removal of '_str' datatype in SMW 1.9 ...................................................................... More fixes for removal of '_str' datatype in SMW 1.9 Change-Id: I41e35b86c24a6f03895d98ba5d557c74c5a3fd48 --- M includes/SD_Filter.php 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticDrilldown refs/changes/28/64928/1 diff --git a/includes/SD_Filter.php b/includes/SD_Filter.php index b4a2179..6a17bb5 100644 --- a/includes/SD_Filter.php +++ b/includes/SD_Filter.php @@ -108,6 +108,9 @@ // A bit inefficient, but it's the // simplest approach. $typeID = $types[0]->getFragment(); + if ( $typeID == '_str' && !array_key_exists( '_str', $datatypeLabels ) ) { + $typeID = '_txt'; + } $typeValue = $datatypeLabels[$typeID]; } else { $typeValue = $types[0]->getWikiValue(); @@ -117,6 +120,8 @@ // _str stopped existing in SMW 1.9 } elseif ( array_key_exists( '_str', $datatypeLabels ) && $typeValue == $datatypeLabels['_str'] ) { $f->property_type = 'string'; + } elseif ( !array_key_exists( '_str', $datatypeLabels ) && $typeValue == $datatypeLabels['_txt'] ) { + $f->property_type = 'string'; } elseif ( $typeValue == $datatypeLabels['_num'] ) { $f->property_type = 'number'; } elseif ( $typeValue == $datatypeLabels['_boo'] ) { -- To view, visit https://gerrit.wikimedia.org/r/64928 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41e35b86c24a6f03895d98ba5d557c74c5a3fd48 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticDrilldown Gerrit-Branch: master Gerrit-Owner: Yaron Koren <yaro...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits