* 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';
*
* @return string
*/
- function queryLimit( $sql ) {
+ private function queryLimit( $sql ) {
return $this->db->limitResult( $sql, $this->limit, $this->offset );
}
* @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 ) . ' ' );
* @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' );
* @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 = [];
*
* @return array
*/
- function parseQuery( $filteredText, $fulltext ) {
+ private function parseQuery( $filteredText, $fulltext ) {
global $wgContLang;
$lc = $this->legalSearchChars( self::CHARS_NO_SYNTAX ); // Minus syntax chars (" and *)
];
}
- function regexTerm( $string, $wildcard ) {
+ private function regexTerm( $string, $wildcard ) {
global $wgContLang;
$regex = preg_quote( $string, '/' );
* @return array
* @since 1.18 (changed)
*/
- function getQuery( $filteredTerm, $fulltext ) {
+ private function getQuery( $filteredTerm, $fulltext ) {
$query = [
'tables' => [],
'fields' => [],
* @param bool $fulltext
* @return string
*/
- function getIndexField( $fulltext ) {
+ private function getIndexField( $fulltext ) {
return $fulltext ? 'si_text' : 'si_title';
}
* @param bool $fulltext
* @since 1.18 (changed)
*/
- function queryMain( &$query, $filteredTerm, $fulltext ) {
+ private function queryMain( &$query, $filteredTerm, $fulltext ) {
$match = $this->parseQuery( $filteredTerm, $fulltext );
$query['tables'][] = 'page';
$query['tables'][] = 'searchindex';
* @param bool $fulltext
* @return array
*/
- function getCountQuery( $filteredTerm, $fulltext ) {
+ private function getCountQuery( $filteredTerm, $fulltext ) {
$match = $this->parseQuery( $filteredTerm, $fulltext );
$query = [
* Return a partial WHERE clause to limit the search to the given namespaces
* @return string
*/
- function queryNamespaces() {
+ private function queryNamespaces() {
if ( is_null( $this->namespaces ) ) {
return '';
}
*
* @return string
*/
- function queryLimit( $sql ) {
+ private function queryLimit( $sql ) {
return $this->db->limitResult( $sql, $this->limit, $this->offset );
}
* @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 ) . ' ' );
* @param bool $fulltext
* @return string
*/
- function getIndexField( $fulltext ) {
+ private function getIndexField( $fulltext ) {
return $fulltext ? 'si_text' : 'si_title';
}
* @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 = [];
*
* @return string
*/
- function parseQuery( $term ) {
+ private function parseQuery( $term ) {
wfDebug( "parseQuery received: $term \n" );
# # No backslashes allowed
* @param string $colname
* @return string
*/
- function searchQuery( $term, $fulltext, $colname ) {
+ private function searchQuery( $term, $fulltext, $colname ) {
# Get the SQL fragment for the given term
$searchstring = $this->parseQuery( $term );
* @param bool $fulltext
* @return string
*/
- function parseQuery( $filteredText, $fulltext ) {
+ private function parseQuery( $filteredText, $fulltext ) {
global $wgContLang;
$lc = $this->legalSearchChars( self::CHARS_NO_SYNTAX ); // Minus syntax chars (" and *)
$searchon = '';
return " $field MATCH $searchon ";
}
- function regexTerm( $string, $wildcard ) {
+ private function regexTerm( $string, $wildcard ) {
global $wgContLang;
$regex = preg_quote( $string, '/' );
* Return a partial WHERE clause to limit the search to the given namespaces
* @return string
*/
- function queryNamespaces() {
+ private function queryNamespaces() {
if ( is_null( $this->namespaces ) ) {
return ''; # search all
}
* @param string $sql
* @return string
*/
- function limitResult( $sql ) {
+ private function limitResult( $sql ) {
return $this->db->limitResult( $sql, $this->limit, $this->offset );
}
* @param bool $fulltext
* @return string
*/
- function getQuery( $filteredTerm, $fulltext ) {
+ private function getQuery( $filteredTerm, $fulltext ) {
return $this->limitResult(
$this->queryMain( $filteredTerm, $fulltext ) . ' ' .
$this->queryNamespaces()
* @param bool $fulltext
* @return string
*/
- function getIndexField( $fulltext ) {
+ private function getIndexField( $fulltext ) {
return $fulltext ? 'si_text' : 'si_title';
}
* @param bool $fulltext
* @return string
*/
- function queryMain( $filteredTerm, $fulltext ) {
+ private function queryMain( $filteredTerm, $fulltext ) {
$match = $this->parseQuery( $filteredTerm, $fulltext );
$page = $this->db->tableName( 'page' );
$searchindex = $this->db->tableName( 'searchindex' );
"WHERE page_id=$searchindex.rowid AND $match";
}
- function getCountQuery( $filteredTerm, $fulltext ) {
+ private function getCountQuery( $filteredTerm, $fulltext ) {
$match = $this->parseQuery( $filteredTerm, $fulltext );
$page = $this->db->tableName( 'page' );
$searchindex = $this->db->tableName( 'searchindex' );