r44481 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44480‎ | r44481 | r44482 >
Date:23:55, 11 December 2008
Author:demon
Status:ok (Comments)
Tags:
Comment:
Self revert. Need to focus when there's no results, not only when there's no term.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialSearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialSearch.php
@@ -619,7 +619,7 @@
620620 if( $t != null && count($this->namespaces) === 1 ) {
621621 $out .= wfMsgExt( 'searchmenu-prefix', array('parseinline'), $term );
622622 }
623 - return $term != '' ? $this->powerSearchFocus() : '' .
 623+ return $this->powerSearchFocus() .
624624 Xml::openElement( 'fieldset', array('id' => 'mw-searchoptions','style' => 'margin:0em;') ) .
625625 Xml::element( 'legend', null, wfMsg('powersearch-legend') ) .
626626 $this->formHeader($term) . $out .
@@ -724,7 +724,7 @@
725725 global $wgScript;
726726 $searchTitle = SpecialPage::getTitleFor( 'Search' );
727727 $searchable = SearchEngine::searchableNamespaces();
728 - $out = $term != '' ? $this->searchFocus() : '';
 728+ $out = $this->searchFocus();
729729 $out .= Xml::openElement( 'form', array( 'id' => 'search', 'method' => 'get', 'action' => $wgScript ) );
730730 $out .= Xml::hidden( 'title', $searchTitle->getPrefixedText() ) . "\n";
731731 // If searching several, but not all namespaces, show what we are searching.

Comments

#Comment by Aaron Schulz (talk | contribs)   03:20, 12 December 2008

You *want* to focus when there are no result and not focus when there are (so you scroll easier)

Status & tagging log