Moved google box out from 'searchdisabled' message. Appended google box to title...
authorMr. E23 <e23@users.mediawiki.org>
Sun, 15 Feb 2004 15:59:45 +0000 (15:59 +0000)
committerMr. E23 <e23@users.mediawiki.org>
Sun, 15 Feb 2004 15:59:45 +0000 (15:59 +0000)
includes/Database.php
includes/SearchEngine.php
languages/Language.php

index 75b4eb3..07f2c03 100644 (file)
@@ -423,7 +423,8 @@ function wfEmergencyAbort( &$conn ) {
                                $t = Title::newFromURL( $title );
                        } elseif ($_REQUEST['search']) {
                                $search = $_REQUEST['search'];
-                               echo wfMsgNoDB( "searchdisabled", htmlspecialchars( $search ), $wgInputEncoding );
+                               echo wfMsgNoDB( "searchdisabled" );
+                               echo wfMsgNoDB( "googlesearch", htmlspecialchars( $search ), $wgInputEncoding );
                                wfAbruptExit();
                        } else {
                                $t = Title::newFromText( wfMsgNoDB( "mainpage" ) );
index e7f397f..7e273cc 100644 (file)
@@ -175,7 +175,8 @@ class SearchEngine {
                $redircond = $this->searchRedirects();
 
                if ( $wgDisableTextSearch ) {
-                       $wgOut->addHTML( wfMsg( "searchdisabled", htmlspecialchars( $search ), $wgInputEncoding ) );
+                       $wgOut->addHTML( wfMsg( "searchdisabled" ) );
+                       $wgOut->addHTML( wfMsg( "googlesearch", htmlspecialchars( $search ), $GLOBALS['wgInputEncoding'] ) );
                } else {
                        $sql = "SELECT cur_id,cur_namespace,cur_title," .
                          "cur_text FROM cur,searchindex " .
@@ -472,8 +473,9 @@ class SearchEngine {
                        }
                } 
                if( ! $anyhit ){
-                       $wgOut->addHTML( wfMsg("notitlematches") );             
+                       $wgOut->addHTML( wfMsg("notitlematches") );
                }
+               $wgOut->addHTML( wfMsg( "googlesearch", htmlspecialchars( $search ), $GLOBALS['wgInputEncoding'] ) );
        }
 
        /* static */ function doFuzzyTitleSearch( $search, $namespace ){
index 3d8f73e..9624328 100644 (file)
@@ -761,8 +761,8 @@ containing all of the search terms will appear in the result).",
 Search in namespaces :<br>
 $1<br>
 $2 List redirects &nbsp; Search for $3 $9",
-"searchdisabled" => "<p>Sorry! Full text search has been disabled temporarily, for performance reasons. In the meantime, you can use the Google search below, which may be out of date.</p>
-
+"searchdisabled" => "<p>Sorry! Full text search has been disabled temporarily, for performance reasons. In the meantime, you can use the Google search below, which may be out of date.</p>",
+"googlesearch" => "
 <!-- SiteSearch Google -->
 <FORM method=GET action=\"http://www.google.com/search\">
 <TABLE bgcolor=\"#FFFFFF\"><tr><td>