[Tickets #3744] NEW: isVINBOXFolder's sense is reversed

bugs@bugs.horde.org bugs at bugs.horde.org
Fri Apr 7 11:35:09 PDT 2006


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=3744
-----------------------------------------------------------------------
 Ticket             | 3744
 Created By         | dustin at ywlcs.org
 Summary            | isVINBOXFolder's sense is reversed
 Queue              | IMP
 Version            | 4.1
 State              | Unconfirmed
 Priority           | 2. Medium
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


dustin at ywlcs.org (2006-04-07 11:35) wrote:

I just upgraded from IMP 4.0.1 to 4.1, and I'm having problems with 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?




More information about the bugs mailing list