From: Michael M Slusarz Date: Mon, 30 Mar 2009 18:48:44 +0000 (-0600) Subject: Better error handling. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9b2c66a07a868d0322f81d4edc1b65ac60a5234b;p=horde.git Better error handling. --- diff --git a/imp/lib/Message.php b/imp/lib/Message.php index dffc48d23..61155092e 100644 --- a/imp/lib/Message.php +++ b/imp/lib/Message.php @@ -74,10 +74,6 @@ class IMP_Message { global $conf, $notification, $prefs; - if (($action == 'move') && $GLOBALS['imp_imap']->isReadOnly($targetMbox)) { - return false; - } - if ($conf['tasklist']['use_tasklist'] && (strpos($targetMbox, '_tasklist_') === 0)) { /* If the target is a tasklist, handle the move/copy specially. */ @@ -120,8 +116,14 @@ class IMP_Message foreach ($msgList as $mbox => $msgIndices) { $error = null; - if (($action == 'move') && $GLOBALS['imp_imap']->isReadOnly($mbox)) { - $error = _("The target directory is read-only."); + if ($GLOBALS['imp_imap']->isReadOnly($targetMbox)) { + $error = _("The target directory is read-only."); + } + + if (!$error && + ($action == 'move') && + $GLOBALS['imp_imap']->isReadOnly($mbox)) { + $error = _("The source directory is read-only."); } if (!$error) {