Make readonly work for OOUI forms
[lhc/web/wiklou.git] / includes / search / SearchMssql.php
index 4960c42..0d7970d 100644 (file)
@@ -34,10 +34,7 @@ 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->query( $this->getQuery( $this->filter( $term ), true ) );
                return new SqlSearchResultSet( $resultSet, $this->searchTerms );
        }
 
@@ -49,10 +46,7 @@ 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->query( $this->getQuery( $this->filter( $term ), false ) );
                return new SqlSearchResultSet( $resultSet, $this->searchTerms );
        }
 
@@ -85,6 +79,8 @@ class SearchMssql extends SearchDatabase {
         * Does not do anything for generic search engine
         * subclasses may define this though
         *
+        * @param string $filteredTerm
+        * @param bool $fulltext
         * @return string
         */
        function queryRanking( $filteredTerm, $fulltext ) {
@@ -134,6 +130,8 @@ class SearchMssql extends SearchDatabase {
        }
 
        /** @todo document
+        * @param string $filteredText
+        * @param bool $fulltext
         * @return string
         */
        function parseQuery( $filteredText, $fulltext ) {
@@ -162,9 +160,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";
        }
 
        /**