* @ingroup Search
*/
class SearchSqlite extends SearchEngine {
+
+ /**
+ * @var DatabaseSqlite
+ */
+ protected $db;
+
/**
* Creates an instance of this class
* @param $db DatabaseSqlite: database object
*/
function __construct( $db ) {
- $this->db = $db;
+ parent::__construct( $db );
}
/**
/**
* Parse the user's query and transform it into an SQL fragment which will
* become part of a WHERE clause
+ *
+ * @return string
*/
function parseQuery( $filteredText, $fulltext ) {
global $wgContLang;
$quote = '"';
}
- if( $searchon !== '' ) $searchon .= ' ';
+ if( $searchon !== '' ) {
+ $searchon .= ' ';
+ }
// Some languages such as Serbian store the input form in the search index,
// so we may need to search for matches in multiple writing system variants.
* The guts shoulds be constructed in queryMain()
* @param $filteredTerm String
* @param $fulltext Boolean
+ * @return String
*/
function getQuery( $filteredTerm, $fulltext ) {
return $this->limitResult(
* @ingroup Search
*/
class SqliteSearchResultSet extends SqlSearchResultSet {
- function SqliteSearchResultSet( $resultSet, $terms, $totalHits=null ) {
+ function __construct( $resultSet, $terms, $totalHits=null ) {
parent::__construct( $resultSet, $terms );
$this->mTotalHits = $totalHits;
}
function getTotalHits() {
return $this->mTotalHits;
}
-}
\ No newline at end of file
+}