From: Chad Horohoe Date: Wed, 31 Dec 2014 16:37:17 +0000 (-0800) Subject: Keep backend param to search API as long as there's a backend X-Git-Tag: 1.31.0-rc.0~12825 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=7a79b017a03c78ddc0b8bf8762346957bef71936;p=lhc%2Fweb%2Fwiklou.git Keep backend param to search API as long as there's a backend Originally this was designed to only show up when there was more than one backend. That's more likely to break for clients though if you want to go back to only having one backend again. Change-Id: I9009f2599f5bc6fa8f9c49370fd0ffb714e31755 --- diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php index 16a491e566..51f799a251 100644 --- a/includes/api/ApiQuerySearch.php +++ b/includes/api/ApiQuerySearch.php @@ -332,7 +332,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase { ); $alternatives = SearchEngine::getSearchTypes(); - if ( count( $alternatives ) > 1 ) { + if ( count( $alternatives ) > 0 ) { if ( $alternatives[0] === null ) { $alternatives[0] = self::BACKEND_NULL_PARAM; }