From 874be20a6ce6eb0f768e755f2bbf52078332a1fb Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 22 Aug 2014 13:24:54 +0000 Subject: [PATCH] Refresh Trash folder folder-status when empty Trash action is triggered not from the Trash folder --- mail/inc/class.mail_ui.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index b997395045..f639018f59 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -4057,6 +4057,15 @@ class mail_ui $response->call('app.mail.lock_tree'); } $this->mail_bo->compressFolder($trashFolder); + + $heirarchyDelimeter = $this->mail_bo->getHierarchyDelimiter(true); + $fShortName = array_pop(explode($heirarchyDelimeter, $trashFolder)); + $fStatus = array( + $icServerID.self::$delimiter.$trashFolder => $fShortName + ); + //Call to reset folder status counter, after emptyTrash triggered not from Trash folder + //-as we don't have trash folder specific information available on client-side we need to deal with it on server + $response->call('app.mail.mail_setFolderStatus',$fStatus); } if ($rememberServerID != $this->mail_bo->profileID) {