Added $wgMaxBacklinksInvalidate to avoid massive html cache invalidation.
[lhc/web/wiklou.git] / includes / search / SearchSqlite.php
index ea2aa8f..e52e4fe 100644 (file)
  * @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 );
        }
 
        /**
@@ -45,6 +51,8 @@ class SearchSqlite extends SearchEngine {
        /**
         * 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;
@@ -66,7 +74,9 @@ class SearchSqlite extends SearchEngine {
                                        $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.
@@ -228,6 +238,7 @@ class SearchSqlite extends SearchEngine {
         * The guts shoulds be constructed in queryMain()
         * @param $filteredTerm String
         * @param $fulltext Boolean
+        * @return String
         */
        function getQuery( $filteredTerm, $fulltext ) {
                return $this->limitResult(
@@ -323,7 +334,7 @@ class SearchSqlite extends SearchEngine {
  * @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;
        }
@@ -331,4 +342,4 @@ class SqliteSearchResultSet extends SqlSearchResultSet {
        function getTotalHits() {
                return $this->mTotalHits;
        }
-}
\ No newline at end of file
+}