summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rwxr-xr-xbin/msgexport.sh2
-rw-r--r--index.php18
3 files changed, 11 insertions, 10 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 3ea41edfa..b4026db69 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,6 +9,7 @@ CHANGELOG Roundcube Webmail
- Fix security issue in DomainFactory driver of Password plugin
- Fix invalid X-Draft-Info on forwarded message draft (#1489587)
- Fix regression in handling of 'attachments' result in message_compose hook (#1489627)
+- Fix issue where msgexport.sh printed the message to STDOUT instead of a file (#1489634)
RELEASE 1.0-rc
--------------
diff --git a/bin/msgexport.sh b/bin/msgexport.sh
index e98e5fee2..f68688b67 100755
--- a/bin/msgexport.sh
+++ b/bin/msgexport.sh
@@ -58,7 +58,7 @@ function export_mailbox($mbox, $filename)
$from = current(rcube_mime::decode_address_list($headers->from, 1, false));
fwrite($out, sprintf("From %s %s UID %d\n", $from['mailto'], $headers->date, $headers->uid));
- fwrite($out, $IMAP->print_raw_body($headers->uid));
+ $IMAP->get_raw_body($headers->uid, $out);
fwrite($out, "\n\n\n");
progress_update($i+1, $count);
diff --git a/index.php b/index.php
index 7adb0beb0..32b1adb19 100644
--- a/index.php
+++ b/index.php
@@ -207,6 +207,15 @@ if (empty($RCMAIL->user->ID)) {
$session_error = true;
}
+ if ($session_error || $_REQUEST['_err'] == 'session') {
+ $OUTPUT->show_message('sessionerror', 'error', null, true, -1);
+ }
+
+ if ($OUTPUT->ajax_call || !empty($_REQUEST['_framed'])) {
+ $OUTPUT->command('session_error', $RCMAIL->url(array('_err' => 'session')));
+ $OUTPUT->send('iframe');
+ }
+
// check if installer is still active
if ($RCMAIL->config->get('enable_installer') && is_readable('./installer/index.php')) {
$OUTPUT->add_footer(html::div(array('style' => "background:#ef9398; border:2px solid #dc5757; padding:0.5em; margin:2em auto; width:50em"),
@@ -218,15 +227,6 @@ if (empty($RCMAIL->user->ID)) {
));
}
- if ($session_error || $_REQUEST['_err'] == 'session') {
- $OUTPUT->show_message('sessionerror', 'error', null, true, -1);
- }
-
- if ($OUTPUT->ajax_call || !empty($_REQUEST['_framed'])) {
- $OUTPUT->command('session_error', $RCMAIL->url(array('_err' => 'session')));
- $OUTPUT->send('iframe');
- }
-
$plugin = $RCMAIL->plugins->exec_hook('unauthenticated', array('task' => 'login', 'error' => $session_error));
$RCMAIL->set_task($plugin['task']);