r105504 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105503‎ | r105504 | r105505 >
Date:00:57, 8 December 2011
Author:yaron
Status:deferred (Comments)
Tags:
Comment:
Simplified retrieval of 'values from property'
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php
@@ -833,9 +833,7 @@
834834 $values = $sub_components[1];
835835 } elseif ( $sub_components[0] == 'values from property' ) {
836836 $propertyName = $sub_components[1];
837 - $propValue = SMWPropertyValue::makeUserProperty( $propertyName );
838 - $isRelation = $propValue->getPropertyTypeID() == '_wpg';
839 - $possible_values = SFAutocompleteAPI::getAllValuesForProperty( $isRelation, $propertyName );
 837+ $possible_values = SFUtils::getAllValuesForProperty( $propertyName );
840838 } elseif ( $sub_components[0] == 'values from category' ) {
841839 $category_name = ucfirst( $sub_components[1] );
842840 $possible_values = SFUtils::getAllPagesForCategory( $category_name, 10 );

Comments

#Comment by Nikerabbit (talk | contribs)   07:19, 8 December 2011

Is the removed code deprecated?

#Comment by Yaron Koren (talk | contribs)   13:36, 8 December 2011

Hi - no, SFAutocompleteAPI::getAllValuesForProperty() is still used elsewhere.