From: Aaron Schulz Date: Fri, 5 Dec 2008 17:10:35 +0000 (+0000) Subject: Keep form only for "file:" searches X-Git-Tag: 1.31.0-rc.0~44114 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=0b0e9f268db93ed5075cf131edbefb4048769b58;p=lhc%2Fweb%2Fwiklou.git Keep form only for "file:" searches --- diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 1930cbb254..8091063809 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -111,7 +111,7 @@ class SpecialSearch { * @param string $term */ public function showResults( $term ) { - global $wgOut, $wgDisableTextSearch; + global $wgOut, $wgDisableTextSearch, $wgContLang; wfProfileIn( __METHOD__ ); $this->setupPage( $term ); @@ -129,7 +129,8 @@ class SpecialSearch { Xml::closeElement('table') ); - if( '' === trim( $term ) ) { + $filePrefix = $wgContLang->getFormattedNsText(NS_FILE).':'; + if( '' === trim( $term ) || $filePrefix === trim( $term ) ) { // Empty query -- straight view of search form wfProfileOut( __METHOD__ ); return;