r89256 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89255‎ | r89256 | r89257 >
Date:13:47, 1 June 2011
Author:yaron
Status:deferred
Tags:
Comment:
More fixes for r89200
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_Utils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_Utils.php
@@ -81,15 +81,21 @@
8282 if ( is_null( $pageName ) ) {
8383 $page = null;
8484 } else {
 85+ $pageName = str_replace( ' ', '_', $pageName );
8586 $page = new SMWDIWikiPage( $pageName, $pageNamespace, null );
8687 }
8788 $property = SMWDIProperty::newFromUserLabel( $propID );
8889 $res = $store->getPropertyValues( $page, $property, $requestOptions );
8990 $values = array();
9091 foreach ( $res as $value ) {
91 - // getSortKey() seems to return the correct
92 - // value for every data type.
93 - $values[] = $value->getSortKey();
 92+ if ( $value instanceof SMWDIUri ) {
 93+ $values[] = $value->getFragment();
 94+ } else {
 95+ // getSortKey() seems to return the
 96+ // correct value for all the other
 97+ // data types.
 98+ $values[] = str_replace( '_', ' ', $value->getSortKey() );
 99+ }
94100 }
95101 return $values;
96102 } else {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89200* Modified getSMWPropertyValues() to try to return an array of actual values,...yaron04:21, 31 May 2011