Revert "Keep backend param to search API as long as there's a backend"
authorChad <chadh@wikimedia.org>
Tue, 6 Jan 2015 18:50:14 +0000 (18:50 +0000)
committerChad <chadh@wikimedia.org>
Tue, 6 Jan 2015 18:50:14 +0000 (18:50 +0000)
Actually on second thought, having the parameter disappear is
a better option than keeping it around with only one possible
value.

This reverts commit 7a79b017a03c78ddc0b8bf8762346957bef71936.

Change-Id: Ia67fa1425e0aa1ee95e0a1733f89d29f94f1eeee

includes/api/ApiQuerySearch.php

index 51f799a..16a491e 100644 (file)
@@ -332,7 +332,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                );
 
                $alternatives = SearchEngine::getSearchTypes();
-               if ( count( $alternatives ) > 0 ) {
+               if ( count( $alternatives ) > 1 ) {
                        if ( $alternatives[0] === null ) {
                                $alternatives[0] = self::BACKEND_NULL_PARAM;
                        }