Merge "Skip 64 bit MWMessagePack tests on 32 bit machines"
[lhc/web/wiklou.git] / includes / search / SearchMssql.php
index 3eef498..0d1663f 100644 (file)
@@ -34,7 +34,10 @@ class SearchMssql extends SearchDatabase {
         * @access public
         */
        function searchText( $term ) {
-               $resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), true ) ) );
+               $resultSet = $this->db->resultObject(
+                       $this->db->query( $this->getQuery( $this->filter( $term ), true ) )
+               );
+
                return new SqlSearchResultSet( $resultSet, $this->searchTerms );
        }
 
@@ -46,7 +49,10 @@ class SearchMssql extends SearchDatabase {
         * @access public
         */
        function searchTitle( $term ) {
-               $resultSet = $this->db->resultObject( $this->db->query( $this->getQuery( $this->filter( $term ), false ) ) );
+               $resultSet = $this->db->resultObject(
+                       $this->db->query( $this->getQuery( $this->filter( $term ), false ) )
+               );
+
                return new SqlSearchResultSet( $resultSet, $this->searchTerms );
        }
 
@@ -132,7 +138,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.
@@ -156,9 +162,9 @@ class SearchMssql extends SearchDatabase {
                        }
                }
 
-               $searchon = $this->db->strencode( join( ',', $q ) );
+               $searchon = $this->db->addQuotes( join( ',', $q ) );
                $field = $this->getIndexField( $fulltext );
-               return "$field, '$searchon'";
+               return "$field, $searchon";
        }
 
        /**