if ( strncmp( $query, $allkeyword, strlen( $allkeyword ) ) == 0 ) {
$this->namespaces = null;
$parsed = substr( $query, strlen( $allkeyword ) );
if ( strncmp( $query, $allkeyword, strlen( $allkeyword ) ) == 0 ) {
$this->namespaces = null;
$parsed = substr( $query, strlen( $allkeyword ) );
$prefix = substr( $query, 0, strpos( $query, ':' ) );
$index = $wgContLang->getNsIndex( $prefix );
if ( $index !== false ) {
$prefix = substr( $query, 0, strpos( $query, ':' ) );
$index = $wgContLang->getNsIndex( $prefix );
if ( $index !== false ) {
*/
public static function getOpenSearchTemplate() {
global $wgOpenSearchTemplate, $wgServer;
*/
public static function getOpenSearchTemplate() {
global $wgOpenSearchTemplate, $wgServer;
return $wgOpenSearchTemplate;
} else {
$ns = implode( '|', SearchEngine::defaultNamespaces() );
return $wgOpenSearchTemplate;
} else {
$ns = implode( '|', SearchEngine::defaultNamespaces() );
* have a useful base class to which you pass some standard information, then
* let the fancy self-highlighters extend that.
* @ingroup Search
* have a useful base class to which you pass some standard information, then
* let the fancy self-highlighters extend that.
* @ingroup Search
public function __construct( $row = null ) {
if ( !is_null( $row ) ) {
// Backwards compatibility with pre-1.17 callers
$this->initFromRow( $row );
}
}
public function __construct( $row = null ) {
if ( !is_null( $row ) ) {
// Backwards compatibility with pre-1.17 callers
$this->initFromRow( $row );
}
}
* @param $row object
*/
protected function initFromRow( $row ) {
$this->initFromTitle( Title::makeTitle( $row->page_namespace, $row->page_title ) );
}
* @param $row object
*/
protected function initFromRow( $row ) {
$this->initFromTitle( Title::makeTitle( $row->page_namespace, $row->page_title ) );
}
2 => '/(\[\[)|(\]\])/', // image
3 => "/(\n\\{\\|)|(\n\\|\\})/" ); // table
2 => '/(\[\[)|(\]\])/', // image
3 => "/(\n\\{\\|)|(\n\\|\\})/" ); // table
if ( function_exists( 'wfCite' ) ) {
$spat .= '|(<ref>)'; // references via cite extension
$endPatterns[4] = '/(<ref>)|(<\/ref>)/';
if ( function_exists( 'wfCite' ) ) {
$spat .= '|(<ref>)'; // references via cite extension
$endPatterns[4] = '/(<ref>)|(<\/ref>)/';
$anyterm = implode( '|', $terms );
$phrase = implode( "$wgSearchHighlightBoundaries+", $terms );
$anyterm = implode( '|', $terms );
$phrase = implode( "$wgSearchHighlightBoundaries+", $terms );
// would be to have contextchars actually be char and not byte
// length, and do proper utf-8 substrings and lengths everywhere,
// but PHP is making that very hard and unclean to implement :(
// would be to have contextchars actually be char and not byte
// length, and do proper utf-8 substrings and lengths everywhere,
// but PHP is making that very hard and unclean to implement :(