Index: trunk/extensions/SemanticForms/includes/SF_Utils.php |
— | — | @@ -81,15 +81,21 @@ |
82 | 82 | if ( is_null( $pageName ) ) { |
83 | 83 | $page = null; |
84 | 84 | } else { |
| 85 | + $pageName = str_replace( ' ', '_', $pageName ); |
85 | 86 | $page = new SMWDIWikiPage( $pageName, $pageNamespace, null ); |
86 | 87 | } |
87 | 88 | $property = SMWDIProperty::newFromUserLabel( $propID ); |
88 | 89 | $res = $store->getPropertyValues( $page, $property, $requestOptions ); |
89 | 90 | $values = array(); |
90 | 91 | 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 | + } |
94 | 100 | } |
95 | 101 | return $values; |
96 | 102 | } else { |