yllar
2006-12-11 df8e8ec9eee72743d0f14a8409aacf66c4a80d89
program/include/rcube_imap.inc
@@ -932,9 +932,9 @@
      
      $struct = &$this->_structure_part($structure);
      $struct->headers = get_object_vars($headers);
      // don't trust given content-type
      if (empty($struct->parts))
      if (empty($struct->parts) && !empty($struct->headers['ctype']))
        {
        $struct->mime_id = '1';
        $struct->mimetype = strtolower($struct->headers['ctype']);
@@ -1012,8 +1012,9 @@
     $struct->size = intval($part[6]);
   // read part disposition
    $di = count($part) - 3;
    if (is_array($part[$di]))
    $di = count($part) - 2;
    if ((is_array($part[$di]) && count($part[$di]) == 2 && is_array($part[$di][1])) ||
        (is_array($part[--$di]) && count($part[$di]) == 2))
      {
      $struct->disposition = strtolower($part[$di][0]);
@@ -1463,12 +1464,8 @@
  function get_quota()
    {
    if ($this->get_capability('QUOTA'))
      {
      $result = iil_C_GetQuota($this->conn);
      if ($result["total"])
        return sprintf("%.2fMB / %.2fMB (%.0f%%)", $result["used"] / 1000.0, $result["total"] / 1000.0, $result["percent"]);
      }
      return iil_C_GetQuota($this->conn);
    return FALSE;
    }
@@ -1764,7 +1761,7 @@
      {
      $this->db->query(
        "UPDATE ".get_table_name('cache')."
         SET    created=now(),
         SET    created=".$this->db->now().",
                data=?
         WHERE  user_id=?
         AND    cache_key=?",
@@ -1778,7 +1775,7 @@
      $this->db->query(
        "INSERT INTO ".get_table_name('cache')."
         (created, user_id, cache_key, data)
         VALUES (now(), ?, ?, ?)",
         VALUES (".$this->db->now().", ?, ?, ?)",
        $_SESSION['user_id'],
        $key,
        $data);
@@ -1967,7 +1964,7 @@
      $this->db->query(
        "INSERT INTO ".get_table_name('messages')."
         (user_id, del, cache_key, created, idx, uid, subject, ".$this->db->quoteIdentifier('from').", ".$this->db->quoteIdentifier('to').", cc, date, size, headers, structure)
         VALUES (?, 0, ?, now(), ?, ?, ?, ?, ?, ?, ".$this->db->fromunixtime($headers->timestamp).", ?, ?, ?)",
         VALUES (?, 0, ?, ".$this->db->now().", ?, ?, ?, ?, ?, ?, ".$this->db->fromunixtime($headers->timestamp).", ?, ?, ?)",
        $_SESSION['user_id'],
        $key,
        $index,
@@ -2380,7 +2377,8 @@
  function _parse_address_list($str)
    {
    $a = $this->_explode_quoted_string(',', $str);
    // remove any newlines and carriage returns before
    $a = $this->_explode_quoted_string(',', preg_replace( "/[\r\n]/", " ", $str));
    $result = array();
    
    foreach ($a as $key => $val)