r47598 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47597‎ | r47598 | r47599 >
Date:07:38, 21 February 2009
Author:mrzman
Status:ok
Tags:
Comment:
(bug 13778) - Add a hidden input to the search form so that using the enter key on IE does a fulltext search like clicking the button does.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialSearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialSearch.php
@@ -634,6 +634,7 @@
635635 " " .
636636 $searchField .
637637 " " .
 638+ Xml::hidden( 'fulltext', 'Advanced search' ) . "\n" .
638639 $searchButton .
639640 "</div>".
640641 "</form>";
@@ -765,6 +766,7 @@
766767 $out .= Xml::hidden( "redirs", (int)$this->searchRedirects );
767768 // Term box
768769 $out .= Xml::input( 'search', 50, $term, array( 'type' => 'text', 'id' => 'searchText' ) ) . "\n";
 770+ $out .= Xml::hidden( 'fulltext', 'Search' );
769771 $out .= Xml::submitButton( wfMsg( 'searchbutton' ), array( 'name' => 'fulltext' ) );
770772 $out .= ' (' . wfMsgExt('searchmenu-help',array('parseinline') ) . ')';
771773 $out .= Xml::closeElement( 'form' );
@@ -1430,10 +1432,11 @@
14311433 $searchField = Xml::input( 'search', 50, $term, array( 'type' => 'text', 'id' => 'powerSearchText' ) );
14321434 $searchButton = Xml::submitButton( wfMsg( 'powersearch' ), array( 'name' => 'fulltext' ) ) . "\n";
14331435 $searchTitle = SpecialPage::getTitleFor( 'Search' );
 1436+ $searchHiddens = Xml::hidden( 'title', $searchTitle->getPrefixedText() ) . "\n";
 1437+ $searchHiddens .= Xml::hidden( 'fulltext', 'Advanced search' ) . "\n";
14341438
14351439 $out = Xml::openElement( 'form', array( 'id' => 'powersearch', 'method' => 'get', 'action' => $wgScript ) ) .
1436 - Xml::fieldset( wfMsg( 'powersearch-legend' ),
1437 - Xml::hidden( 'title', $searchTitle->getPrefixedText() ) . "\n" .
 1440+ Xml::fieldset( wfMsg( 'powersearch-legend' ),
14381441 "<p>" .
14391442 wfMsgExt( 'powersearch-ns', array( 'parseinline' ) ) .
14401443 "</p>\n" .
@@ -1446,6 +1449,7 @@
14471450 "&nbsp;" .
14481451 $searchField .
14491452 "&nbsp;" .
 1453+ $searchHiddens .
14501454 $searchButton ) .
14511455 "</form>";
14521456
@@ -1470,13 +1474,14 @@
14711475 'action' => $wgScript
14721476 ));
14731477 $searchTitle = SpecialPage::getTitleFor( 'Search' );
1474 - $out .= Xml::hidden( 'title', $searchTitle->getPrefixedText() );
14751478 $out .= Xml::input( 'search', 50, $term, array( 'type' => 'text', 'id' => 'searchText' ) ) . ' ';
14761479 foreach( SearchEngine::searchableNamespaces() as $ns => $name ) {
14771480 if( in_array( $ns, $this->namespaces ) ) {
14781481 $out .= Xml::hidden( "ns{$ns}", '1' );
14791482 }
14801483 }
 1484+ $out .= Xml::hidden( 'title', $searchTitle->getPrefixedText() );
 1485+ $out .= Xml::hidden( 'fulltext', 'Search' );
14811486 $out .= Xml::submitButton( wfMsg( 'searchbutton' ), array( 'name' => 'fulltext' ) );
14821487 $out .= Xml::closeElement( 'form' );
14831488
Index: trunk/phase3/RELEASE-NOTES
@@ -207,6 +207,8 @@
208208 changed to rc_timestamp_bot
209209 * (bug 17437) Fixed incorrect link to web-based installer
210210 * (bug 17538) Use shorter URLs in <link> elements
 211+* (bug 13778) Hidden input added to the search form so that using the Enter key
 212+ on IE will do a fulltext search like clicking the button does
211213
212214 == API changes in 1.15 ==
213215 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions

Status & tagging log