Merge "SpecialUserlogin: Error out when attempting to create a username with a '#'"
[lhc/web/wiklou.git] / includes / search / SearchMssql.php
index 6326112..ed76ff8 100644 (file)
@@ -30,24 +30,24 @@ class SearchMssql extends SearchDatabase {
         * Perform a full text search query and return a result set.
         *
         * @param string $term Raw search term
-        * @return MssqlSearchResultSet
+        * @return SqlSearchResultSet
         * @access public
         */
        function searchText( $term ) {
                $resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), true ) ) );
-               return new MssqlSearchResultSet( $resultSet, $this->searchTerms );
+               return new SqlSearchResultSet( $resultSet, $this->searchTerms );
        }
 
        /**
         * Perform a title-only search query and return a result set.
         *
         * @param string $term Raw search term
-        * @return MssqlSearchResultSet
+        * @return SqlSearchResultSet
         * @access public
         */
        function searchTitle( $term ) {
                $resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), false ) ) );
-               return new MssqlSearchResultSet( $resultSet, $this->searchTerms );
+               return new SqlSearchResultSet( $resultSet, $this->searchTerms );
        }
 
        /**
@@ -132,7 +132,7 @@ class SearchMssql extends SearchDatabase {
         */
        function parseQuery( $filteredText, $fulltext ) {
                global $wgContLang;
-               $lc = SearchEngine::legalSearchChars();
+               $lc = $this->legalSearchChars();
                $this->searchTerms = array();
 
                # @todo FIXME: This doesn't handle parenthetical expressions.
@@ -204,29 +204,3 @@ class SearchMssql extends SearchDatabase {
                return $this->db->query( $sql, 'SearchMssql::updateTitle' );
        }
 }
-
-/**
- * @ingroup Search
- */
-class MssqlSearchResultSet extends SearchResultSet {
-       function __construct( $resultSet, $terms ) {
-               $this->mResultSet = $resultSet;
-               $this->mTerms = $terms;
-       }
-
-       function termMatches() {
-               return $this->mTerms;
-       }
-
-       function numRows() {
-               return $this->mResultSet->numRows();
-       }
-
-       function next() {
-               $row = $this->mResultSet->fetchObject();
-               if ( $row === false ) {
-                       return false;
-               }
-               return new SearchResult( $row );
-       }
-}