From 75376cb4757f55ee95aefa4d91e0971a8baa6ea2 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 5 Feb 2009 23:05:27 -0700 Subject: [PATCH] Don't remove message from list when copying --- imp/lib/Message.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/imp/lib/Message.php b/imp/lib/Message.php index 16edd3772..820a33281 100644 --- a/imp/lib/Message.php +++ b/imp/lib/Message.php @@ -19,6 +19,9 @@ class IMP_Message { /** + * The singleton IMP_Message instance + * + * @var IMP_Message */ protected static $_instance = null; @@ -30,9 +33,9 @@ class IMP_Message protected $_usepop = false; /** - * Returns a reference to the global IMP_Message object, only creating it if - * it doesn't already exist. This ensures that only one IMP_Message instance - * is instantiated for any given session. + * Returns a reference to the global IMP_Message object, only creating it + * if it doesn't already exist. This ensures that only one IMP_Message + * instance is instantiated for any given session. * * @return IMP_Message The IMP_Message instance. */ @@ -126,7 +129,7 @@ class IMP_Message $GLOBALS['imp_imap']->ob->copy($mbox, $targetMbox, array('ids' => $msgIndices, 'move' => $imap_move)); $imp_mailbox = IMP_Mailbox::singleton($mbox); - if ($imp_mailbox->isBuilt()) { + if (($action == 'move') && $imp_mailbox->isBuilt()) { $imp_mailbox->removeMsgs(array($mbox => $msgIndices)); } } catch (Horde_Imap_Client_Exception $e) { -- 2.11.0