X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fsearch%2FSearchSqlite.php;h=eee69307fcce84e1ab964bb976d92e7a57466c83;hb=062a6fecdadd2bdbd6be303702e0e96c98dfda81;hp=8e820f373de9dc9a26bab1314514779fd08b2efd;hpb=d65e736864d17ecc84385a26295e5859de2f9fee;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/search/SearchSqlite.php b/includes/search/SearchSqlite.php index 8e820f373d..eee69307fc 100644 --- a/includes/search/SearchSqlite.php +++ b/includes/search/SearchSqlite.php @@ -38,6 +38,8 @@ class SearchSqlite extends SearchDatabase { * Parse the user's query and transform it into an SQL fragment which will * become part of a WHERE clause * + * @param string $filteredText + * @param bool $fulltext * @return string */ function parseQuery( $filteredText, $fulltext ) { @@ -164,7 +166,7 @@ class SearchSqlite extends SearchDatabase { } protected function searchInternal( $term, $fulltext ) { - global $wgCountTotalSearchHits, $wgContLang; + global $wgContLang; if ( !$this->fulltextSearchSupported() ) { return null; @@ -174,14 +176,12 @@ class SearchSqlite extends SearchDatabase { $resultSet = $this->db->query( $this->getQuery( $filteredTerm, $fulltext ) ); $total = null; - if ( $wgCountTotalSearchHits ) { - $totalResult = $this->db->query( $this->getCountQuery( $filteredTerm, $fulltext ) ); - $row = $totalResult->fetchObject(); - if ( $row ) { - $total = intval( $row->c ); - } - $totalResult->free(); + $totalResult = $this->db->query( $this->getCountQuery( $filteredTerm, $fulltext ) ); + $row = $totalResult->fetchObject(); + if ( $row ) { + $total = intval( $row->c ); } + $totalResult->free(); return new SqlSearchResultSet( $resultSet, $this->searchTerms, $total ); }