$num = wfNumRows($res1);
if ( $wgDisableTextSearch ) {
- $wgOut->addHTML( wfMsg( "searchdisabled", $search, $wgInputEncoding ) );
+ $wgOut->addHTML( wfMsg( "searchdisabled", htmlspecialchars( $search ), $wgInputEncoding ) );
} else {
$sk = $wgUser->getSkin();
$text = wfMsg( "searchresulttext", $sk->makeKnownLink(
wfFreeResult( $res1 );
$wgOut->addHTML( "</ol>\n" );
}
- }
-
- if ( $wgDisableTextSearch ) {
- $wgOut->addHTML( wfMsg( "searchdisabled", $search, $wgInputEncoding ) );
- } else {
+
if ( 0 == wfNumRows( $res2 ) ) {
$wgOut->addHTML( "<h2>" . wfMsg( "notextmatches" ) .
"</h2>\n" );
border=\"0\" ALT=\"Google\"></A>
</td>
<td>
-<INPUT TYPE=text name=q size=31 maxlength=255 value=\"\">
+<INPUT TYPE=text name=q size=31 maxlength=255 value=\"$1\">
<INPUT type=submit name=btnG VALUE=\"Google Search\">
<font size=-1>
<input type=hidden name=domains value=\"{$wgServer}\"><br><input type=radio name=sitesearch value=\"\"> WWW <input type=radio name=sitesearch value=\"{$wgServer}\" checked> {$wgServer} <br>