Index: trunk/extensions/SemanticForms/includes/SF_Utils.php |
— | — | @@ -329,7 +329,17 @@ |
330 | 330 | $query_result = $store->getQueryResult( $query ); |
331 | 331 | $pages = array(); |
332 | 332 | while ( $res = $query_result->getNext() ) { |
333 | | - $pages[] = $res[0]->getNextText( SMW_OUTPUT_WIKI ); |
| 333 | + $page_name = $res[0]->getNextText( SMW_OUTPUT_WIKI ); |
| 334 | + if ( ! is_null( $substring ) ) { |
| 335 | + // until SMW queries can handle substrings, we |
| 336 | + // have to filter out pages manually |
| 337 | + if ( stripos( $page_name, $substring ) === 0 || |
| 338 | + stristr( $page_name, ' ' . $substring ) ) { |
| 339 | + $pages[] = $page_name; |
| 340 | + } |
| 341 | + } else { |
| 342 | + $pages[] = $page_name; |
| 343 | + } |
334 | 344 | } |
335 | 345 | sort( $pages ); |
336 | 346 | return $pages; |
Index: trunk/extensions/SemanticForms/libs/SF_yui_autocompletion.js |
— | — | @@ -27,6 +27,8 @@ |
28 | 28 | this.oACDS.scriptQueryAppend = "action=sfautocomplete&format=json&attribute=" + data_source; |
29 | 29 | else if (data_type == 'category') |
30 | 30 | this.oACDS.scriptQueryAppend = "action=sfautocomplete&format=json&category=" + data_source; |
| 31 | + else if (data_type == 'concept') |
| 32 | + this.oACDS.scriptQueryAppend = "action=sfautocomplete&format=json&concept=" + data_source; |
31 | 33 | else if (data_type == 'namespace') |
32 | 34 | this.oACDS.scriptQueryAppend = "action=sfautocomplete&format=json&namespace=" + data_source; |
33 | 35 | else if (data_type == 'external_url') |