alecpl
2010-03-12 5027c326e9bf2c4c6ad8ab2aed3673ae83bd2b2c
program/include/rcube_imap.php
@@ -43,7 +43,6 @@
{
  var $db;
  var $conn;
  var $root_ns = '';
  var $root_dir = '';
  var $mailbox = 'INBOX';
  var $list_page = 1;
@@ -145,10 +144,7 @@
    if ($this->conn)
      {
      if (!empty($this->conn->rootdir))
        {
        $this->set_rootdir($this->conn->rootdir);
        $this->root_ns = preg_replace('/[.\/]$/', '', $this->conn->rootdir);
        }
      if (empty($this->delimiter))
   $this->get_hierarchy_delimiter();
      }
@@ -515,6 +511,9 @@
      // not very performant but more precise (using UNDELETED)
      $index = $this->_search_index($mailbox, $search_str);
      $count = is_array($index) ? count($index) : 0;
      if ($mode == 'ALL')
        $_SESSION['maxuid'][$mailbox] = $index ? $this->_id2uid(max($index)) : 0;
      }
    else {
      if ($mode == 'UNSEEN')
@@ -1793,7 +1792,7 @@
    // move messages
    $iil_move = iil_C_Move($this->conn, join(',', $a_uids), $from_mbox, $to_mbox);
    $moved = !($iil_move === false || $iil_move < 0);
    // send expunge command in order to have the moved message
    // really deleted from the source mailbox
    if ($moved) {
@@ -1802,8 +1801,8 @@
      $this->_clear_messagecount($to_mbox);
    }
    // moving failed
    else if (rcmail::get_instance()->config->get('delete_always', false)) {
      return iil_C_Delete($this->conn, $from_mbox, join(',', $a_uids));
    else if ($config->get('delete_always', false) && $tbox == $config->get('trash_mbox')) {
      return $this->delete_message($a_uids, $fbox);
    }
    // remove message ids from search set
@@ -2922,7 +2921,7 @@
   */
  function mod_mailbox($mbox_name, $mode='in')
    {
    if ((!empty($this->root_ns) && $this->root_ns == $mbox_name) || $mbox_name == 'INBOX')
    if ($mbox_name == 'INBOX')
      return $mbox_name;
    if (!empty($this->root_dir)) {