* When a user is prohibited from creating a page, a title of "View source"
makes no sense, and there should be no "Return to [[Page]]" link.
* (bug 12486) Protected titles now give a warning for privileged editors.
+* (bug 9939) Special:Search now sets focus to search input box when no existing
+ search is active
=== Bug fixes in 1.12 ===
global $wgOut;
$wgOut->addWikiText( wfMsg( 'searchresulttext' ) );
- #if ( !$this->parseQuery() ) {
if( '' === trim( $term ) ) {
+ // Empty query -- straight view of search form
$wgOut->setSubtitle( '' );
$wgOut->addHTML( $this->powerSearchBox( $term ) );
+ $wgOut->addHTML( $this->powerSearchFocus() );
wfProfileOut( $fname );
return;
}
: '';
$redirect = "<input type='checkbox' value='1' name=\"redirs\"{$checked} />\n";
- $searchField = '<input type="text" name="search" value="' .
+ $searchField = '<input type="text" id="powerSearchText" name="search" value="' .
htmlspecialchars( $term ) ."\" size=\"16\" />\n";
$searchButton = '<input type="submit" name="searchx" value="' .
return "<br /><br />\n<form id=\"powersearch\" method=\"get\" " .
"action=\"$action\">\n{$ret}\n</form>\n";
}
+
+ function powerSearchFocus() {
+ return "<script type='text/javascript'>" .
+ "document.getElementById('powerSearchText').focus();" .
+ "</script>";
+ }
}