Email subject in content language instead of sending user's UI language
[lhc/web/wiklou.git] / includes / SearchMySQL.php
index 6683cbe..905075e 100644 (file)
 /**
  * Search engine hook base class for MySQL.
  * Specific bits for MySQL 3 and 4 variants are in child classes.
- * @package MediaWiki
- * @subpackage Search
+ * @addtogroup Search
  */
-
-/** */
-require_once( 'SearchEngine.php' );
-
-/** @package MediaWiki */
 class SearchMySQL extends SearchEngine {
        /**
         * Perform a full text search query and return a result set.
@@ -57,7 +51,7 @@ class SearchMySQL extends SearchEngine {
        /**
         * Return a partial WHERE clause to exclude redirects, if so set
         * @return string
-        * @access private
+        * @private
         */
        function queryRedirect() {
                if( $this->showRedirects ) {
@@ -70,7 +64,7 @@ class SearchMySQL extends SearchEngine {
        /**
         * Return a partial WHERE clause to limit the search to the given namespaces
         * @return string
-        * @access private
+        * @private
         */
        function queryNamespaces() {
                $namespaces = implode( ',', $this->namespaces );
@@ -83,7 +77,7 @@ class SearchMySQL extends SearchEngine {
        /**
         * Return a LIMIT clause to limit results on the query.
         * @return string
-        * @access private
+        * @private
         */
        function queryLimit() {
                return $this->db->limitResult( '', $this->limit, $this->offset );
@@ -93,7 +87,7 @@ class SearchMySQL extends SearchEngine {
         * Does not do anything for generic search engine
         * subclasses may define this though
         * @return string
-        * @access private
+        * @private
         */
        function queryRanking( $filteredTerm, $fulltext ) {
                return '';
@@ -104,7 +98,7 @@ class SearchMySQL extends SearchEngine {
         * The guts shoulds be constructed in queryMain()
         * @param string $filteredTerm
         * @param bool $fulltext
-        * @access private
+        * @private
         */
        function getQuery( $filteredTerm, $fulltext ) {
                return $this->queryMain( $filteredTerm, $fulltext ) . ' ' .
@@ -133,7 +127,7 @@ class SearchMySQL extends SearchEngine {
         * @param string $filteredTerm
         * @param bool $fulltext
         * @return string
-        * @access private
+        * @private
         */
        function queryMain( $filteredTerm, $fulltext ) {
                $match = $this->parseQuery( $filteredTerm, $fulltext );
@@ -153,7 +147,7 @@ class SearchMySQL extends SearchEngine {
         * @param string $text
         */
        function update( $id, $title, $text ) {
-               $dbw=& wfGetDB( DB_MASTER );
+               $dbw = wfGetDB( DB_MASTER );
                $dbw->replace( 'searchindex',
                        array( 'si_page' ),
                        array(
@@ -171,7 +165,7 @@ class SearchMySQL extends SearchEngine {
         * @param string $title
         */
     function updateTitle( $id, $title ) {
-               $dbw =& wfGetDB( DB_MASTER );
+               $dbw = wfGetDB( DB_MASTER );
 
                $dbw->update( 'searchindex',
                        array( 'si_title' => $title ),
@@ -181,7 +175,9 @@ class SearchMySQL extends SearchEngine {
        }
 }
 
-/** @package MediaWiki */
+/**
+ * @addtogroup Search
+ */
 class MySQLSearchResultSet extends SearchResultSet {
        function MySQLSearchResultSet( $resultSet, $terms ) {
                $this->mResultSet = $resultSet;
@@ -204,6 +200,10 @@ class MySQLSearchResultSet extends SearchResultSet {
                        return new SearchResult( $row );
                }
        }
+       
+       function free() {
+               $this->mResultSet->free();
+       }
 }
 
-?>
+