X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fsearch%2FSearchEngine.php;h=bfcfb59804c4f5bf222c8a31cb51ffadc4b9c172;hp=7ac24c5d25d2aed067c335afb45d4678141ac5e4;hb=29ef5f88ab95a7df05d5b48cced165bcc2f88b60;hpb=993f0c6f1e1708d78cccca3e9133c62f9392e245 diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php index 7ac24c5d25..bfcfb59804 100644 --- a/includes/search/SearchEngine.php +++ b/includes/search/SearchEngine.php @@ -406,17 +406,6 @@ abstract class SearchEngine { // 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 @@ -454,7 +443,9 @@ abstract class SearchEngine { $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 ] );