6.0.0-beta1
8/12/25

[#5387] Empty mailbox doesn't
Summary Empty mailbox doesn't
Queue IMP
Queue Version HEAD
Type Bug
State Resolved
Priority 2. Medium
Owners Horde Developers (at) , chuck (at) horde (dot) org, slusarz (at) horde (dot) org
Requester selsky (at) columbia (dot) edu
Created 05/21/2007 (6658 days ago)
Due
Updated 03/19/2008 (6355 days ago)
Assigned 03/19/2008 (6355 days ago)
Resolved 03/19/2008 (6355 days ago)
Github Issue Link
Github Pull Request
Milestone 4.2
Patch No

History
03/19/2008 06:29:03 PM Chuck Hagenbuch Comment #13
State ⇒ Resolved
Reply to this comment
Excellent, thanks.
03/19/2008 06:26:50 PM liamr (at) umich (dot) edu Comment #12 Reply to this comment
Weird.  I can't replicate it anymore.



Ok, I guess I revert to my original statement that the patch has fixed 
the issue.
03/19/2008 06:09:18 PM Michael Slusarz Comment #11 Reply to this comment
Furthermore, what you describe is exactly what I do to test -- I use 
trash and only turn it off when I am doing dev work/bug tracking.  And 
it works fine for me.



The logic is "expunge all messages if not using trash or if in the 
trash mailbox."  Or, put a different way, "only expunge if either 
there is no trash mailbox defined or if the current mailbox is the 
trash mailbox."
03/19/2008 06:04:41 PM Chuck Hagenbuch Comment #10 Reply to this comment
0 should still evaluate to false there, so the trash folder should be 
null, so the check should be fine (if I'm reading it in context 
correctly). Can you put in some variable checks (var_dump or such) to 
check all that?
03/19/2008 02:27:19 PM liamr (at) umich (dot) edu Comment #9 Reply to this comment
Actually, I spoke to soon.



It's still broken if a user has a use_trash preference, if use_trash 
is turned off (e.g. when someone has tried "use_trash" and then 
decided they didn't like it and turned it off...)



| liamr    | imp        | use_trash | 0          |



I'm guessing that "use_trash" set to 0 breaks the empy($trash_folder) 
check in the patch..



+                $trash_folder = 
($GLOBALS['prefs']->getValue('use_trash')) ? 
IMP::folderPref($GLOBALS['prefs']->getValue('trash_folder'), true) : 
null;

+                if (empty($trash_folder) || ($trash_folder == $mbox)) {




03/19/2008 02:12:09 PM liamr (at) umich (dot) edu Comment #8 Reply to this comment
Yay!   
http://lists.horde.org/archives/cvs/Week-of-Mon-20080317/076363.html   
fixes the issue.



Thanks so much!
03/19/2008 06:42:34 AM Michael Slusarz Comment #7
Milestone ⇒ 4.2
Priority ⇒ 2. Medium
State ⇒ Feedback
Assigned to Horde DevelopersHorde Developers
Assigned to Michael Slusarz
Reply to this comment
03/18/2008 08:51:10 PM liamr (at) umich (dot) edu Comment #6 Reply to this comment
This sounds an awful lot like the problem I've been describing in email..



http://marc.info/?l=imp&m=120587110731837&w=2

http://marc.info/?l=imp&m=120498692231289&w=2



All the user feedback we've received thus far in testing is that 
"Empty folder" should delete and expunge, and currently neither Head 
nor IMP 4.2 RC2 or 3 do that.  Our rollout team concurs.



Even if "empty folder" is only supposed to delete and not expunge, it 
doesn't do that well either.  The "empty folder" icon present in 
mailbox view, will tell you that the folder's been emptied, but then 
doesn't refresh the message list.  It tells you it's deleted 
everything, but unless you refresh the screen, the messages don't even 
appear to be marked deleted.



Based on the comments in this ticket, and our own experience, I don't 
think this issue is actually resolved.


06/21/2007 08:39:52 PM Matt Selsky Comment #5 Reply to this comment
I just tried this from the mailbox view, and it marked all messages 
deleted, but didn't immediately expunge...
06/16/2007 12:17:05 AM Chuck Hagenbuch Comment #4
Taken from Jan Schneider
Taken from Michael Slusarz
Assigned to Chuck Hagenbuch
State ⇒ Resolved
Reply to this comment
Having thought about this five more seconds, I realized that the 
changed behavior made "empty folder" pretty non-useful from the 
Folders screen, if you're not using a trash folder. So I changed it to 
use the trash folder if there is a trash folder, but otherwise to go 
ahead and delete the messages immediately.
06/16/2007 12:09:01 AM Chuck Hagenbuch Comment #3
Assigned to Jan Schneider
Assigned to Michael Slusarz
State ⇒ Assigned
Reply to this comment
I think, having used this for a few weeks now, that I like the old 
behavior better, and it is more consistent with how we document the 
feature.



If we keep the new behavior, then I -think- the problem is that 
calling IMP_Message::delete() with array('1:*') for $indices works for 
the IMAP deletion, but that the message cache isn't updated properly 
(I don't think IMP_MailboxCache groks 1:*). I don't use a trash 
folder, and using empty mailbox the first time has no apparent effect 
- but if I purge the folder afterwards, then it is emptied.
05/21/2007 10:04:30 PM Jan Schneider Comment #2
Type ⇒ Bug
State ⇒ Feedback
Priority ⇒ 1. Low
Reply to this comment
IMP_Message::emptyMailbox() uses IMP_Message::delete() which we use 
for *any* message deletion.
05/21/2007 09:42:10 PM Matt Selsky Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Empty mailbox doesn't
Queue ⇒ IMP
State ⇒ New
Reply to this comment
When trash folder is not used, "empty folder" button doesn't empty the 
folder.  It marks all messages as deleted and says "Emptied all 
messages from %s."



It should either say "Marked all messages in %s as deleted" or it 
should expunge the folder to actually empty it.

Saved Queries