X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fsearch%2FSearchMssql.php;h=43bd3bed2738a081731b6e5d2f0be3a4cbae45c6;hb=df240f953745fdee98b04edb85edeb49ebea3854;hp=57ca06e39f214986dec37bba3692ee8c3e264e28;hpb=8e185ecb2b53217665ea53f63119a28b3f80ff56;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/search/SearchMssql.php b/includes/search/SearchMssql.php index 57ca06e39f..43bd3bed27 100644 --- a/includes/search/SearchMssql.php +++ b/includes/search/SearchMssql.php @@ -31,9 +31,8 @@ class SearchMssql extends SearchDatabase { * * @param string $term Raw search term * @return SqlSearchResultSet - * @access public */ - function searchText( $term ) { + protected function doSearchText( $term ) { $resultSet = $this->db->query( $this->getQuery( $this->filter( $term ), true ) ); return new SqlSearchResultSet( $resultSet, $this->searchTerms ); } @@ -43,9 +42,8 @@ class SearchMssql extends SearchDatabase { * * @param string $term Raw search term * @return SqlSearchResultSet - * @access public */ - function searchTitle( $term ) { + protected function doSearchTitle( $term ) { $resultSet = $this->db->query( $this->getQuery( $this->filter( $term ), false ) ); return new SqlSearchResultSet( $resultSet, $this->searchTerms ); } @@ -54,9 +52,8 @@ class SearchMssql extends SearchDatabase { * Return a partial WHERE clause to limit the search to the given namespaces * * @return string - * @private */ - function queryNamespaces() { + private function queryNamespaces() { $namespaces = implode( ',', $this->namespaces ); if ( $namespaces == '' ) { $namespaces = '0'; @@ -71,7 +68,7 @@ class SearchMssql extends SearchDatabase { * * @return string */ - function queryLimit( $sql ) { + private function queryLimit( $sql ) { return $this->db->limitResult( $sql, $this->limit, $this->offset ); } @@ -95,7 +92,7 @@ class SearchMssql extends SearchDatabase { * @param bool $fulltext * @return string */ - function getQuery( $filteredTerm, $fulltext ) { + private function getQuery( $filteredTerm, $fulltext ) { return $this->queryLimit( $this->queryMain( $filteredTerm, $fulltext ) . ' ' . $this->queryNamespaces() . ' ' . $this->queryRanking( $filteredTerm, $fulltext ) . ' ' ); @@ -117,9 +114,8 @@ class SearchMssql extends SearchDatabase { * @param string $filteredTerm * @param bool $fulltext * @return string - * @private */ - function queryMain( $filteredTerm, $fulltext ) { + private function queryMain( $filteredTerm, $fulltext ) { $match = $this->parseQuery( $filteredTerm, $fulltext ); $page = $this->db->tableName( 'page' ); $searchindex = $this->db->tableName( 'searchindex' ); @@ -134,7 +130,7 @@ class SearchMssql extends SearchDatabase { * @param bool $fulltext * @return string */ - function parseQuery( $filteredText, $fulltext ) { + private function parseQuery( $filteredText, $fulltext ) { global $wgContLang; $lc = $this->legalSearchChars( self::CHARS_NO_SYNTAX ); $this->searchTerms = [];