Index: trunk/phase3/includes/specials/SpecialSearch.php |
— | — | @@ -619,7 +619,7 @@ |
620 | 620 | if( $t != null && count($this->namespaces) === 1 ) { |
621 | 621 | $out .= wfMsgExt( 'searchmenu-prefix', array('parseinline'), $term ); |
622 | 622 | } |
623 | | - return $this->powerSearchFocus() . |
| 623 | + return $term != '' ? $this->powerSearchFocus() : '' . |
624 | 624 | Xml::openElement( 'fieldset', array('id' => 'mw-searchoptions','style' => 'margin:0em;') ) . |
625 | 625 | Xml::element( 'legend', null, wfMsg('powersearch-legend') ) . |
626 | 626 | $this->formHeader($term) . $out . |
— | — | @@ -633,7 +633,7 @@ |
634 | 634 | "document.getElementById('searchText').focus();" . |
635 | 635 | "});" . |
636 | 636 | "</script>"; |
637 | | - } |
| 637 | + } |
638 | 638 | |
639 | 639 | protected function powerSearchFocus() { |
640 | 640 | global $wgJsMimeType; |
— | — | @@ -724,7 +724,7 @@ |
725 | 725 | global $wgScript; |
726 | 726 | $searchTitle = SpecialPage::getTitleFor( 'Search' ); |
727 | 727 | $searchable = SearchEngine::searchableNamespaces(); |
728 | | - $out = $this->searchFocus(); |
| 728 | + $out = $term != '' ? $this->searchFocus() : ''; |
729 | 729 | $out .= Xml::openElement( 'form', array( 'id' => 'search', 'method' => 'get', 'action' => $wgScript ) ); |
730 | 730 | $out .= Xml::hidden( 'title', $searchTitle->getPrefixedText() ) . "\n"; |
731 | 731 | // If searching several, but not all namespaces, show what we are searching. |