thomascube
2006-02-05 cc95700b58f31f04470db8271a09d6e52ba9a63d
program/include/rcube_imap.inc
@@ -986,8 +986,18 @@
    
    if ($msg_count>0)
      {
      $this->clear_message_cache($mailbox.'.msg');
      return iil_C_ClearFolder($this->conn, $mailbox);
      $cleared = iil_C_ClearFolder($this->conn, $mailbox);
      // make sure the message count cache is cleared as well
      if ($cleared)
        {
        $this->clear_message_cache($mailbox.'.msg');
        $a_mailbox_cache = $this->get_cache('messagecount');
        unset($a_mailbox_cache[$mailbox]);
        $this->update_cache('messagecount', $a_mailbox_cache);
        }
      return $cleared;
      }
    else
      return 0;
@@ -1047,6 +1057,22 @@
    }
  /**
   * Get quota
   * added by Nuny
   */
  function get_quota()
    {
    if ($this->get_capability('QUOTA'))
      {
      $result = iil_C_GetQuota($this->conn);
      return sprintf("%.2fMB / %.2fMB (%.0f%%)", $result["used"] / 1000.0, $result["total"] / 1000.0, $result["percent"]);
      }
    else
      return 'unknown';
    }
  // subscribe to a specific mailbox(es)
  function subscribe($mbox, $mode='subscribe')
    {