X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialSearch.php;h=9280b0478fcb7d86892b40453a24c26157d373b6;hp=6daf19f5c3e7607ca792c6187057a9d81851cc04;hb=9964ca1a390c446397dcd466916ffed356cdc3c9;hpb=07f29f4e660b6c09e4e5cd4affff2c0a79df3d9d diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 6daf19f5c3..9280b0478f 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -234,11 +234,6 @@ class SpecialSearch extends SpecialPage { return; } - # No match, generate an edit URL - $title = Title::newFromText( $term ); - if ( !is_null( $title ) ) { - Hooks::run( 'SpecialSearchNogomatch', [ &$title ] ); - } $this->showResults( $term ); } @@ -422,7 +417,12 @@ class SpecialSearch extends SpecialPage { $out->addHTML( '
\n$1
", [ $hasOtherResults ? 'search-nonefound-thiswiki' : 'search-nonefound', wfEscapeWikiText( $term ) @@ -455,7 +455,6 @@ class SpecialSearch extends SpecialPage { $out->addHTML( "" ); Hooks::run( 'SpecialSearchResultsAppend', [ $this, $out, $term ] ); - } /** @@ -470,25 +469,6 @@ class SpecialSearch extends SpecialPage { return "\n$wikiMsg
"; } - /** - * Decide if the suggested query should be run, and it's results returned - * instead of the provided $textMatches - * - * @param SearchResultSet $textMatches The results of a users query - * @return bool - */ - protected function shouldRunSuggestedQuery( SearchResultSet $textMatches ) { - if ( !$this->runSuggestion || - !$textMatches->hasSuggestion() || - $textMatches->numRows() > 0 || - $textMatches->searchContainedSyntax() - ) { - return false; - } - - return $this->getConfig()->get( 'SearchRunSuggestedQuery' ); - } - /** * Generates HTML shown to the user when we have a suggestion about a query * that might give more results than their current query. @@ -752,7 +732,6 @@ class SpecialSearch extends SpecialPage { * @return string */ protected function showHit( SearchResult $result, $terms, $position ) { - if ( $result->isBrokenTitle() ) { return ''; } @@ -972,7 +951,6 @@ class SpecialSearch extends SpecialPage { * @return string */ protected function showInterwikiHit( $result, $lastInterwiki, $query ) { - if ( $result->isBrokenTitle() ) { return ''; } @@ -1335,24 +1313,6 @@ class SpecialSearch extends SpecialPage { return false; } - /** - * Check if query starts with all: prefix - * - * @param string $term The string to check - * @return bool - */ - protected function startsWithAll( $term ) { - - $allkeyword = $this->msg( 'searchall' )->inContentLanguage()->text(); - - $parts = explode( ':', $term ); - if ( count( $parts ) > 1 ) { - return $parts[0] == $allkeyword; - } - - return false; - } - /** * @since 1.18 *