| Summary | isVINBOXFolder's sense is reversed |
| Queue | IMP |
| Queue Version | 4.1 |
| Type | Bug |
| State | Resolved |
| Priority | 2. Medium |
| Owners | |
| Requester | dustin (at) ywlcs (dot) org |
| Created | 04/07/2006 (7197 days ago) |
| Due | |
| Updated | 04/07/2006 (7197 days ago) |
| Assigned | |
| Resolved | 04/07/2006 (7197 days ago) |
| Github Issue Link | |
| Github Pull Request | |
| Milestone | |
| Patch | No |
State ⇒ Resolved
http://cvs.horde.org/diff.php?r1=1.77&r2=1.78&ty=h&f=imp%2Flib%2FSearch.php
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ isVINBOXFolder's sense is reversed
Queue ⇒ IMP
the "Hide Deleted Messages" link not appearing for users.
I've narrowed it down to a problem with isVINBOXFolder. As I
understand it, this function should detect when the currently
displayed mailbox is the virtual INBOX, and thus should not allow
deleted messages to be shown (see
http://thread.gmane.org/gmane.comp.horde.imp/20320/focus=20352).
However, it's doing just the opposite -- it's calling all regular IMAP
folders virtual inboxes, and not calling my single (auto-created)
virtual mailbox a virtual inbox (thus allowing me to hide/show deleted
messages there).
All of our users have pref vinbox_id='', as that's the default. I
tried deleting those prefs, and they came right back. I think the
problem in isVINBOXFolder is that when the current folder's ID is
null, and the pref is '', they compare as equal. I think the reason
it's not getting set is here, in createVINBOXFolder (imp/Search.php):
<pre>
if (empty($vinbox_id)) {
$vtrash_id = $this->addVFolder($query, $flist, array(), $label);
$GLOBALS['prefs']->setValue('vinbox_id', $vinbox_id);
$_SESSION['imp']['search']['vinbox_id'] = $vinbox_id;
} else {
$vtrash_id = $this->addVFolder($query, $flist, array(),
$label, $vinbox_id);
}
</pre>
where the second line should assign to vinbox_id instead of vtrash_id
(looks like a copy-paste error..)
Thoughts?