r92004 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92003‎ | r92004 | r92005 >
Date:20:50, 12 July 2011
Author:devayon
Status:deferred
Tags:
Comment:
minor fix to JS
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php
@@ -448,9 +448,9 @@
449449 minLength: 2,
450450 source: function(request, response) {
451451 request.term=request.term.substr(request.term.lastIndexOf("\\n")+1);
452 - url=wgScriptPath+'/api.php?action=opensearch&limit=10&namespace='+wgNamespaceIds['property']+'&format=jsonfm&search=';
 452+ url=wgScriptPath+'/api.php?action=opensearch&limit=10&namespace='+wgNamespaceIds['property']+'&format=jsonfm';
453453
454 - jQuery.getJSON(url+request.term, function(data){
 454+ jQuery.getJSON(url, 'search='+request.term, function(data){
455455 //remove the namespace prefix 'Property:' from returned data and add prefix '?'
456456 for(i=0;i<data[1].length;i++) data[1][i]="?"+data[1][i].substr(data[1][i].indexOf(':')+1);
457457 response(jQuery.ui.autocomplete.filter(data[1], escapeQuestion(extractLast(request.term))));