From bcab02d0873352083a3d7a2e929d231b7b3c2d67 Mon Sep 17 00:00:00 2001 From: "Mr. E23" Date: Sun, 15 Feb 2004 15:59:45 +0000 Subject: [PATCH] Moved google box out from 'searchdisabled' message. Appended google box to title search result page. --- includes/Database.php | 3 ++- includes/SearchEngine.php | 6 ++++-- languages/Language.php | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/includes/Database.php b/includes/Database.php index 75b4eb3ee1..07f2c03be7 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -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" ) ); diff --git a/includes/SearchEngine.php b/includes/SearchEngine.php index e7f397f706..7e273cc56f 100644 --- a/includes/SearchEngine.php +++ b/includes/SearchEngine.php @@ -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 ){ diff --git a/languages/Language.php b/languages/Language.php index 3d8f73e791..9624328391 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -761,8 +761,8 @@ containing all of the search terms will appear in the result).", Search in namespaces :
$1
$2 List redirects   Search for $3 $9", -"searchdisabled" => "

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.

- +"searchdisabled" => "

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.

", +"googlesearch" => "
-- 2.20.1