Fix search term in google form, doubled google
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 24 Nov 2003 09:51:33 +0000 (09:51 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 24 Nov 2003 09:51:33 +0000 (09:51 +0000)
includes/SearchEngine.php
languages/Language.php

index 52416cf..7253e6e 100644 (file)
@@ -181,7 +181,7 @@ class SearchEngine {
                $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(
@@ -251,11 +251,7 @@ class SearchEngine {
                                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" );
index 458f07f..e0cee20 100644 (file)
@@ -723,7 +723,7 @@ $2 List redirects &nbsp; Search for $3 $9",
 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>