From 0b0e9f268db93ed5075cf131edbefb4048769b58 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 5 Dec 2008 17:10:35 +0000 Subject: [PATCH] Keep form only for "file:" searches --- includes/specials/SpecialSearch.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.20.1