Self revert. Need to focus when there's no results, not only when there's no term.
authorChad Horohoe <demon@users.mediawiki.org>
Thu, 11 Dec 2008 23:55:44 +0000 (23:55 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Thu, 11 Dec 2008 23:55:44 +0000 (23:55 +0000)
includes/specials/SpecialSearch.php

index bb493cc..880af73 100644 (file)
@@ -619,7 +619,7 @@ class SpecialSearch {
                if( $t != null && count($this->namespaces) === 1 ) {
                        $out .= wfMsgExt( 'searchmenu-prefix', array('parseinline'), $term );
                }
-               return $term != '' ? $this->powerSearchFocus() : '' .
+               return $this->powerSearchFocus() .
                        Xml::openElement( 'fieldset', array('id' => 'mw-searchoptions','style' => 'margin:0em;') ) .
                        Xml::element( 'legend', null, wfMsg('powersearch-legend') ) .
                        $this->formHeader($term) . $out . 
@@ -724,7 +724,7 @@ class SpecialSearch {
                global $wgScript;
                $searchTitle = SpecialPage::getTitleFor( 'Search' );
                $searchable = SearchEngine::searchableNamespaces();
-               $out = $term != '' ? $this->searchFocus() : '';
+               $out = $this->searchFocus();
                $out .= Xml::openElement( 'form', array( 'id' => 'search', 'method' => 'get', 'action' => $wgScript ) );
                $out .= Xml::hidden( 'title', $searchTitle->getPrefixedText() ) . "\n";
                // If searching several, but not all namespaces, show what we are searching.