Merge "Switch action=opensearch call to list=prefixsearch where appropriate"

This commit is contained in:
jenkins-bot 2014-05-29 00:38:20 +00:00 committed by Gerrit Code Review
commit 21b4249360

View file

@ -69,29 +69,15 @@ ve.ui.MWLinkTargetInputWidget.prototype.onLookupMenuItemChoose = function ( item
* @returns {jqXHR} AJAX object without success or fail handlers attached
*/
ve.ui.MWLinkTargetInputWidget.prototype.getLookupRequest = function () {
var propsJqXhr,
searchJqXhr = ve.init.mw.Target.static.apiRequest( {
'action': 'opensearch',
'search': this.value,
'namespace': 0,
'suggest': ''
} );
return searchJqXhr.then( function ( data ) {
propsJqXhr = ve.init.mw.Target.static.apiRequest( {
return ve.init.mw.Target.static.apiRequest( {
'action': 'query',
'generator': 'prefixsearch',
'gpssearch': this.value,
'gpsnamespace': 0,
'prop': 'info|pageprops',
'titles': ( data[1] || [] ).join( '|' ),
'ppprop': 'disambiguation'
'ppprop': 'disambiguation',
'redirect': ''
} );
return propsJqXhr;
} ).promise( { abort: function () {
searchJqXhr.abort();
if ( propsJqXhr ) {
propsJqXhr.abort();
}
} } );
};
/**