Merge "mw.Feedback: If the message is posted remotely, link the title correctly"
[lhc/web/wiklou.git] / includes / search / SearchEngine.php
index 3c8fe60..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;
                }
        }
 
@@ -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;
                                }