From 799359457f89646efa502a08e66cd9875a010178 Mon Sep 17 00:00:00 2001 From: alecpl Date: Tue, 21 Sep 2010 08:24:52 +0000 Subject: - Don't create a new rcube_browser object, use browser property from output object --- program/steps/mail/get.inc | 2 +- program/steps/mail/viewsource.inc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'program') diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc index 5e4414059..07af7559d 100644 --- a/program/steps/mail/get.inc +++ b/program/steps/mail/get.inc @@ -79,7 +79,7 @@ else if ($pid = get_input_value('_part', RCUBE_INPUT_GET)) { $ctype_secondary = strtolower($part->ctype_secondary); $mimetype = sprintf('%s/%s', $ctype_primary, $ctype_secondary); - $browser = new rcube_browser; + $browser = $RCMAIL->output->browser; // send download headers if ($_GET['_download']) { diff --git a/program/steps/mail/viewsource.inc b/program/steps/mail/viewsource.inc index a110238d9..9b6572677 100644 --- a/program/steps/mail/viewsource.inc +++ b/program/steps/mail/viewsource.inc @@ -30,8 +30,8 @@ if ($uid = get_input_value('_uid', RCUBE_INPUT_GET)) if (!empty($_GET['_save'])) { $filename = ($headers->subject ? $IMAP->decode_header($headers->subject) : 'roundcube') . '.eml'; - $browser = new rcube_browser; - + $browser = $RCMAIL->output->browser; + if ($browser->ie && $browser->ver < 7) $filename = rawurlencode(abbreviate_string($filename, 55)); else if ($browser->ie) @@ -42,7 +42,7 @@ if ($uid = get_input_value('_uid', RCUBE_INPUT_GET)) header("Content-Length: {$headers->size}"); header("Content-Disposition: attachment; filename=\"$filename\""); } - + $IMAP->print_raw_body($uid); } else -- cgit v1.2.3