Merge "mediawiki.user: Return a promise from getRights/getGroups"
[lhc/web/wiklou.git] / includes / search / SearchMySQL.php
index f63931d..b2bc1c2 100644 (file)
@@ -211,12 +211,11 @@ class SearchMySQL extends SearchEngine {
        }
 
        public function supports( $feature ) {
-               switch( $feature ) {
-               case 'list-redirects':
+               switch ( $feature ) {
                case 'title-suffix-filter':
                        return true;
                default:
-                       return false;
+                       return parent::supports( $feature );
                }
        }
 
@@ -369,6 +368,19 @@ class SearchMySQL extends SearchEngine {
                        array( $dbw->lowPriorityOption() ) );
        }
 
+       /**
+        * Delete an indexed page
+        * Title should be pre-processed.
+        *
+        * @param Integer $id Page id that was deleted
+        * @param String $title Title of page that was deleted
+        */
+       function delete( $id, $title ) {
+               $dbw = wfGetDB( DB_MASTER );
+
+               $dbw->delete( 'searchindex', array( 'si_page' => $id ), __METHOD__ );
+       }
+
        /**
         * Converts some characters for MySQL's indexing to grok it correctly,
         * and pads short words to overcome limitations.