From: Chuck Hagenbuch Date: Thu, 15 Jan 2009 03:42:00 +0000 (-0500) Subject: only unflag if there are deleted messages that matched X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=2622fb19c75ed02fd3006c0e7b69a078ca284bd4;p=horde.git only unflag if there are deleted messages that matched --- diff --git a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php index 598d0d6a8..fd4b110ba 100644 --- a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php +++ b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php @@ -1328,8 +1328,9 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base $res = $this->search($mailbox, $search_query); $unflag = $res['match']; - - $this->store($mailbox, array('ids' => $unflag, 'remove' => array('\\deleted'))); + if ($unflag) { + $this->store($mailbox, array('ids' => $unflag, 'remove' => array('\\deleted'))); + } } /* We need to get Msgno -> UID lookup table if we are caching.