Author Topic: Problem with inbox. (Solved)  (Read 10430 times)

Offline lhadata

  • Newbie
  • *
  • Posts: 2
Problem with inbox. (Solved)
« on: July 26, 2006, 12:02:46 PM »
Hi!
I really like roundcube and it's far better than other webmails :).

Now to my problem, i have the latest snapshot rev 282 i configured it right and i login to my regular mail so far so good. But when i test to login with a newly created account just for testing i realized that the inbox folder doesn't exists (in the mailboxlist).

It exists on the folderpage in settings and it's unsubscribed but i can't change subscription, and yes i have changed the protection from TRUE to FALSE in config. This problem only appears when the user hasn't recieved any mail yet.

I have also tried to locate where the problem is with no result.

Offline lhadata

  • Newbie
  • *
  • Posts: 2
Re: Problem with inbox.
« Reply #1 on: July 31, 2006, 10:23:47 AM »
I Solved the problem by myself.

If somone else has this problem i post the solution:

open up roundcube/program/include/rcube_imap.inc

Search for: function _list_mailboxes

Replace the whole function with this:
Code: [Select]
function _list_mailboxes($root='', $filter='*')
  {
  $a_defaults = $a_out = array();
 
  // get cached folder list  
  $a_mboxes = $this->get_cache('mailboxes');
  if (is_array($a_mboxes))
   return $a_mboxes;

  // retrieve list of folders from IMAP server
  $a_folders = iil_C_ListSubscribed($this->conn, $this->_mod_mailbox($root), $filter);
 
  if (!is_array($a_folders) || !sizeof($a_folders))
   $a_folders = array();

  // create Default folders if they do not exist
  global $CONFIG;

  foreach ($CONFIG['default_imap_folders'] as $folder)
   {
   if (!in_array_nocase($folder, $a_folders))
    {
    $this->create_mailbox($folder, TRUE);
    $this->subscribe($folder);
    }
   }

  $a_folders = iil_C_ListSubscribed($this->conn, $this->_mod_mailbox($root), $filter);
  $a_mailbox_cache = array();

  if (!in_array("INBOX", $a_folders)){
    array_unshift($a_folders, "INBOX");
$this->subscribe("INBOX");
  }

  // write mailboxlist to cache
  $this->update_cache('mailboxes', $a_folders);
 
  return $a_folders;
  }

This forces the inbox to always be shown no matter what.

Offline flosoft

  • Sr. Member
  • ****
  • Posts: 349
    • http://flosoft.biz
Re: Problem with inbox. (Solved)
« Reply #2 on: July 31, 2006, 01:11:40 PM »
Moving to resolved.