Remove "include redirects" option from search
[lhc/web/wiklou.git] / includes / search / SearchSqlite.php
index ebff68e..6b2b3c6 100644 (file)
@@ -184,18 +184,6 @@ class SearchSqlite extends SearchDatabase {
                return new SqliteSearchResultSet( $resultSet, $this->searchTerms, $total );
        }
 
-       /**
-        * Return a partial WHERE clause to exclude redirects, if so set
-        * @return String
-        */
-       function queryRedirect() {
-               if ( $this->showRedirects ) {
-                       return '';
-               } else {
-                       return 'AND page_is_redirect=0';
-               }
-       }
-
        /**
         * Return a partial WHERE clause to limit the search to the given namespaces
         * @return String
@@ -231,7 +219,6 @@ class SearchSqlite extends SearchDatabase {
        function getQuery( $filteredTerm, $fulltext ) {
                return $this->limitResult(
                        $this->queryMain( $filteredTerm, $fulltext ) . ' ' .
-                       $this->queryRedirect() . ' ' .
                        $this->queryNamespaces()
                );
        }
@@ -267,8 +254,7 @@ class SearchSqlite extends SearchDatabase {
                $searchindex = $this->db->tableName( 'searchindex' );
                return "SELECT COUNT(*) AS c " .
                        "FROM $page,$searchindex " .
-                       "WHERE page_id=$searchindex.rowid AND $match" .
-                       $this->queryRedirect() . ' ' .
+                       "WHERE page_id=$searchindex.rowid AND $match " .
                        $this->queryNamespaces();
        }