svncommit
2006-12-18 04d6304b4d1b272d5cd533abfbc2240d8ce77c38
If the message is single mime part and non-text, show it as an empty message with an attachment, instead of not displaying anything at all.


2 files modified
14 ■■■■■ changed files
program/lib/mime.inc 2 ●●● patch | view | raw | blame | history
program/steps/mail/func.inc 12 ●●●●● patch | view | raw | blame | history
program/lib/mime.inc
@@ -108,7 +108,7 @@
        }
        //echo "s - part: $part rest: $rest array: ".implode(" ", $a)."<br>\n";
        if (is_array($a[$part-1])) return $a[$part-1];
        else return false;
        else return $a;
    }else if (($part==0) || (empty($part))){
        return $a;
    }
program/steps/mail/func.inc
@@ -1004,6 +1004,18 @@
      }
    }
  // message is single part non-text
  else
    {
    if (($fname = $structure->d_parameters['filename']) ||
        ($fname = $structure->ctype_parameters['name']) ||
        ($fname = $structure->headers['content-description']))
      {
      $structure->filename = rcube_imap::decode_mime_string($fname);
      $a_attachments[] = $structure;
      }
    }
  return array($a_return_parts, $a_attachments);
  }