From 0daff8c9e77e70da1df6522a7fd9ef3322192b63 Mon Sep 17 00:00:00 2001 From: stekkel Date: Sun, 6 Jun 2004 02:06:46 +0000 Subject: [PATCH] Moved $imap_error_titles into sqimap_asearch_error_box because that's the only place that needs that error and it probably will stop a gettext error about a non existent _() function git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7605 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_asearch.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/functions/imap_asearch.php b/functions/imap_asearch.php index 0d32c93f..49c270f2 100644 --- a/functions/imap_asearch.php +++ b/functions/imap_asearch.php @@ -88,17 +88,6 @@ $imap_asearch_months = array( '12' => 'dec' ); -/** Error message titles according to imap server returned code -* @global array $imap_error_titles -*/ -$imap_error_titles = array( - 'OK' => '', - 'NO' => _("ERROR : Could not complete request."), - 'BAD' => _("ERROR : Bad or malformed request."), - 'BYE' => _("ERROR : Imap server closed the connection."), - '' => _("ERROR : Connection dropped by imap-server.") -); - /** * Function to display an error related to an IMAP-query. * We need to do our own error management since we may receive NO responses on purpose (even BAD with SORT or THREAD) @@ -112,7 +101,16 @@ $imap_error_titles = array( //@global array color sm colors array function sqimap_asearch_error_box($response, $query, $message, $link = '') { - global $imap_error_titles; + global $color; + // Error message titles according to imap server returned code + $imap_error_titles = array( + 'OK' => '', + 'NO' => _("ERROR : Could not complete request."), + 'BAD' => _("ERROR : Bad or malformed request."), + 'BYE' => _("ERROR : Imap server closed the connection."), + '' => _("ERROR : Connection dropped by imap-server.") + ); + if (!array_key_exists($response, $imap_error_titles)) $title = _("ERROR : Unknown imap response."); -- 2.25.1