#518 2.16-5: no INBOX folder name

2.16
closed
5
2012-09-17
2006-12-17
Johan Schurer
No

In the treeview no INBOX was showed just a blank and the number of emails:

Example:
[ ] (5)
[ ] Sent
[ ] Drafts
[ ] Trash
etc..

This was tracked back to a 'missing' delimiter. The IMAP server omits a delimiter for the INBOX.

Solution:

modules/email/treeview.inc line 36:
while($email->next_record())
{
< if ($pos = strrpos($email->f('name'), $email->f('delimiter')))

   if ($pos = strrpos($email->f('name'), $email->f('delimiter')) && $email->f('delimiter') != "")
    {
        $folder_name = substr($email->f('name'),$pos+1);

modules/email/folders.inc:

line 206:
< if ($pos = strrpos($email->f('name'), $email->f('delimiter')))

if ($pos = strrpos($email->f('name'), $email->f('delimiter')) && $email->f('delimiter') != "")

line 236:
< if ($pos = strrpos($email->f('name'), $email->f('delimiter')))

if ($pos = strrpos($email->f('name'), $email->f('delimiter')) && $email->f('delimiter') != "")

Discussion

  • Johan Schurer
    Johan Schurer
    2007-01-02

    Logged In: YES
    user_id=9883
    Originator: YES

    Hi!

    Just noticed there needs to be an extra set of () arround "($pos = strrpos($email->f('name'), $email->f('delimiter'))" in order to get $pos right.

    So, in full:
    if (($pos = strrpos($email->f('name'), $email->f('delimiter'))) && $email->f('delimiter') != "")