// no-op
}
- /**
- * Get OpenSearch suggestion template
- *
- * @deprecated since 1.25
- * @return string
- */
- public static function getOpenSearchTemplate() {
- wfDeprecated( __METHOD__, '1.25' );
- return ApiOpenSearch::getOpenSearchTemplate( 'application/x-suggestions+json' );
- }
-
/**
* Get the raw text for updating the index from a content object
* Nicer search backends could possibly do something cooler than
$ns = $this->namespaces;
if ( $title && !$title->isExternal() ) {
$ns = [ $title->getNamespace() ];
- $search = $title->getText();
+ if ( $title->getNamespace() !== NS_MAIN ) {
+ $search = substr( $search, strpos( $search, ':' ) + 1 );
+ }
if ( $ns[0] == NS_MAIN ) {
$ns = $this->namespaces; // no explicit prefix, use default namespaces
Hooks::run( 'PrefixSearchExtractNamespace', [ &$ns, &$search ] );