diff options
author | thomascube <thomas@roundcube.net> | 2006-02-04 19:08:10 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2006-02-04 19:08:10 +0000 |
commit | 58e3602a37cccab55f71fbf839b32fbc4322699c (patch) | |
tree | 4f48f72eb95d6ad7fb69ac09644e96f890bfded8 /program/steps/mail/func.inc | |
parent | 76ffa2a099300325b34c92a9291dc4031b8a0d8a (diff) |
Bugfixes for encoding and sending with attachments
Diffstat (limited to 'program/steps/mail/func.inc')
-rw-r--r-- | program/steps/mail/func.inc | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 8e0178d7a..d089dd272 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -545,6 +545,25 @@ function rcmail_messagecount_display($attrib) } +function rcmail_quota_display($attrib) + { + global $IMAP, $OUTPUT, $JS_OBJECT_NAME; + + if (!$attrib['id']) + $attrib['id'] = 'rcmquotadisplay'; + + $OUTPUT->add_script(sprintf("%s.gui_object('quotadisplay', '%s');", $JS_OBJECT_NAME, $attrib['id'])); + + // allow the following attributes to be added to the <span> tag + $attrib_str = create_attrib_string($attrib, array('style', 'class', 'id')); + + + $out = '<span' . $attrib_str . '>'; + $out .= $IMAP->get_quota(); + $out .= '</span>'; + return $out; + } + function rcmail_get_messagecount_text() { @@ -580,10 +599,9 @@ function rcmail_print_body($part, $safe=FALSE, $plain=FALSE) // $body, $ctype_pr extract($part); $block = $plain ? '%s' : '%s'; //'<div style="display:block;">%s</div>'; - $body = $IMAP->mime_decode($body, $encoding); + $body = $IMAP->mime_decode($body, $encoding); $body = $IMAP->charset_decode($body, $parameters); - // text/html if ($ctype_secondary=='html') { @@ -804,7 +822,7 @@ function rcmail_parse_message($structure, $arg=array(), $recursive=FALSE) } // part text/[plain|html] OR message/delivery-status - else if (($primary_type=='text' && ($secondary_type=='plain' || $secondary_type=='html')) || + else if (($primary_type=='text' && ($secondary_type=='plain' || $secondary_type=='html') && $mail_part->disposition!='attachment') || ($primary_type=='message' && $secondary_type=='delivery-status')) { $a_return_parts[] = array('type' => 'content', |