Merge "mw.Feedback: If the message is posted remotely, link the title correctly"
[lhc/web/wiklou.git] / includes / search / SearchEngine.php
index 7c2f0f2..7ac24c5 100644 (file)
@@ -112,11 +112,11 @@ abstract class SearchEngine {
         */
        public function supports( $feature ) {
                switch ( $feature ) {
-               case 'search-update':
-                       return true;
-               case 'title-suffix-filter':
-               default:
-                       return false;
+                       case 'search-update':
+                               return true;
+                       case 'title-suffix-filter':
+                       default:
+                               return false;
                }
        }
 
@@ -269,7 +269,7 @@ abstract class SearchEngine {
         * might support more. The default in all implementations should be 'relevance.'
         *
         * @since 1.25
-        * @return array(string) the valid sort directions for setSort
+        * @return string[] the valid sort directions for setSort
         */
        public function getValidSorts() {
                return [ 'relevance' ];
@@ -543,7 +543,7 @@ abstract class SearchEngine {
                                $this->setLimitOffset( $fallbackLimit );
                                $fallbackSearchResult = $this->completionSearch( $fbs );
                                $results->appendAll( $fallbackSearchResult );
-                               $fallbackLimit -= count( $fallbackSearchResult );
+                               $fallbackLimit -= $fallbackSearchResult->getSize();
                                if ( $fallbackLimit <= 0 ) {
                                        break;
                                }