Keep backend param to search API as long as there's a backend
authorChad Horohoe <chadh@wikimedia.org>
Wed, 31 Dec 2014 16:37:17 +0000 (08:37 -0800)
committerChad Horohoe <chadh@wikimedia.org>
Wed, 31 Dec 2014 16:37:17 +0000 (08:37 -0800)
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

includes/api/ApiQuerySearch.php

index 16a491e..51f799a 100644 (file)
@@ -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;
                        }