http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89256
Revision: 89256
Author: yaron
Date: 2011-06-01 13:47:14 +0000 (Wed, 01 Jun 2011)
Log Message:
-----------
More fixes for r89200
Modified Paths:
--------------
trunk/extensions/SemanticForms/includes/SF_Utils.php
Modified: trunk/extensions/SemanticForms/includes/SF_Utils.php
===================================================================
--- trunk/extensions/SemanticForms/includes/SF_Utils.php 2011-06-01
13:44:29 UTC (rev 89255)
+++ trunk/extensions/SemanticForms/includes/SF_Utils.php 2011-06-01
13:47:14 UTC (rev 89256)
@@ -81,15 +81,21 @@
if ( is_null( $pageName ) ) {
$page = null;
} else {
+ $pageName = str_replace( ' ', '_', $pageName );
$page = new SMWDIWikiPage( $pageName,
$pageNamespace, null );
}
$property = SMWDIProperty::newFromUserLabel( $propID );
$res = $store->getPropertyValues( $page, $property,
$requestOptions );
$values = array();
foreach ( $res as $value ) {
- // getSortKey() seems to return the correct
- // value for every data type.
- $values[] = $value->getSortKey();
+ if ( $value instanceof SMWDIUri ) {
+ $values[] = $value->getFragment();
+ } else {
+ // getSortKey() seems to return the
+ // correct value for all the other
+ // data types.
+ $values[] = str_replace( '_', ' ',
$value->getSortKey() );
+ }
}
return $values;
} else {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs