From: stekkel Date: Thu, 24 Oct 2002 13:57:13 +0000 (+0000) Subject: nice error messages X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8813fb150d0c0d643e3752c2ba282aed5479a382;p=squirrelmail.git nice error messages git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4005 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_general.php b/functions/imap_general.php index d085800d..72d72566 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -473,20 +473,36 @@ function sqimap_append ($imap_stream, $sent_folder, $length) { $tmp = fgets ($imap_stream, 1024); } -function sqimap_append_done ($imap_stream) { +function sqimap_append_done ($imap_stream, $folder='') { global $squirrelmail_language, $color; fputs ($imap_stream, "\r\n"); $tmp = fgets ($imap_stream, 1024); if (preg_match("/(.*)(BAD|NO)(.*)$/", $tmp, $regs)) { set_up_language($squirrelmail_language); require_once(SM_PATH . 'functions/display_messages.php'); - $string = "\n" . + $reason = $regs[3]; + if ($regs[2] == 'NO') { + $string = "\n" . + _("ERROR : Could not append message to") ." $folder." . + "
\n" . + _("Server responded: ") . + $reason . "
\n"; + if (preg_match("/(.*)(quota)(.*)$/i", $reason, $regs)) { + $string .= _("Sollution: ") . + _("Remove unnessecarry messages from your folder and start with your Trash folder.") + ."
\n"; + } + $string .= "
\n"; + error_box($string,$color); + } else { + $string = "\n" . _("ERROR : Bad or malformed request.") . "
\n" . _("Server responded: ") . $tmp . "

\n"; - error_box($string,$color); - exit; + error_box($string,$color); + exit; + } } }