protected function searchInternal($term, $fulltext) { global $wgCountTotalSearchHits, $wgContLang; if (!$this->fulltextSearchSupported()) { return null; } $filteredTerm = $this->filter($wgContLang->lc($term)); $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(); } return new SqliteSearchResultSet($resultSet, $this->searchTerms, $total); }