/// Feature values
protected $features = array();
- /**
- * @var DatabaseBase
- */
- protected $db;
-
- function __construct( $db = null ) {
- if ( $db ) {
- $this->db = $db;
- } else {
- $this->db = wfGetDB( DB_SLAVE );
- }
- }
-
/**
* Perform a full text search query and return a result set.
* If title searches are not supported or disabled, return null.
return null;
}
- /**
- * If this search backend can list/unlist redirects
- * @deprecated since 1.18 Call supports( 'list-redirects' );
- * @return bool
- */
- function acceptListRedirects() {
- wfDeprecated( __METHOD__, '1.18' );
- return $this->supports( 'list-redirects' );
- }
-
/**
* @since 1.18
* @param $feature String
$this->namespaces = null;
$parsed = substr( $query, strlen( $allkeyword ) );
} elseif ( strpos( $query, ':' ) !== false ) {
- $prefix = substr( $query, 0, strpos( $query, ':' ) );
+ $prefix = str_replace( ' ', '_', substr( $query, 0, strpos( $query, ':' ) ) );
$index = $wgContLang->getNsIndex( $prefix );
if ( $index !== false ) {
$this->namespaces = array( $index );
}
$search = new $class( $dbr );
- $search->setLimitOffset( 0, 0 );
return $search;
}