From 9287ed36b368f2c41d02293b781bb061a6875eef Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 11 Sep 2012 09:15:24 +0200 Subject: - Replace data URIs of images (pasted in HTML editor) with inline attachments (#1488502) --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) (limited to 'CHANGELOG') diff --git a/CHANGELOG b/CHANGELOG index 1d2225a1f..f3960e686 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Replace data URIs of images (pasted in HTML editor) with inline attachments (#1488502) - Fix PLAIN authentication for some IMAP servers (#1488674) - Fix encoding vCard file when contains PHOTO;ENCODING=b (#1488683) - Fix focus issue in IE when selecting message row (#1488620) -- cgit v1.2.3 From 1e9aa256091f56589e75489deff3259a3586ad1f Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 11 Sep 2012 19:34:35 +0200 Subject: Fix error where session wasn't updated after folder rename/delete (#1488692) --- CHANGELOG | 1 + program/steps/settings/folders.inc | 14 ++++++++++++-- program/steps/settings/save_folder.inc | 11 ++++++++--- 3 files changed, 21 insertions(+), 5 deletions(-) (limited to 'CHANGELOG') diff --git a/CHANGELOG b/CHANGELOG index f3960e686..4f5ace427 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix error where session wasn't updated after folder rename/delete (#1488692) - Replace data URIs of images (pasted in HTML editor) with inline attachments (#1488502) - Fix PLAIN authentication for some IMAP servers (#1488674) - Fix encoding vCard file when contains PHOTO;ENCODING=b (#1488683) diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc index 6ca704998..3231ed644 100644 --- a/program/steps/settings/folders.inc +++ b/program/steps/settings/folders.inc @@ -85,6 +85,11 @@ else if ($RCMAIL->action == 'delete-folder') else { $deleted = $plugin['result']; } + + // #1488692: update session + if ($deleted && $_SESSION['mbox'] === $mbox) { + $RCMAIL->session->remove('mbox'); + } } if ($OUTPUT->ajax_call && $deleted) { @@ -393,15 +398,20 @@ function rcmail_rename_folder($oldname, $newname) foreach ($a_threaded as $key => $val) { if ($key == $oldname) { unset($a_threaded[$key]); - $a_threaded[$newname] = true; + $a_threaded[$newname] = true; } else if (preg_match($oldprefix, $key)) { unset($a_threaded[$key]); - $a_threaded[preg_replace($oldprefix, $newname.$delimiter, $key)] = true; + $a_threaded[preg_replace($oldprefix, $newname.$delimiter, $key)] = true; } } $RCMAIL->user->save_prefs(array('message_threading' => $a_threaded)); + // #1488692: update session + if ($_SESSION['mbox'] === $oldname) { + $_SESSION['mbox'] = $newname; + } + return true; } diff --git a/program/steps/settings/save_folder.inc b/program/steps/settings/save_folder.inc index 73cc5e4bf..877b0fbbe 100644 --- a/program/steps/settings/save_folder.inc +++ b/program/steps/settings/save_folder.inc @@ -1,11 +1,11 @@ show_message('folderupdated', 'confirmation'); + if ($rename) { + // #1488692: update session + if ($_SESSION['mbox'] === $folder['oldname']) { + $_SESSION['mbox'] = $folder['name']; + } rcmail_update_folder_row($folder['name'], $folder['oldname'], $folder['subscribe'], $folder['class']); $OUTPUT->send('iframe'); } -- cgit v1.2.3 From 524e48e99aa7b6f50cba4d32d192124fe2de958c Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 13 Sep 2012 12:19:49 +0200 Subject: Fix invalid error message on deleting mail from read only folder (#1488694) --- CHANGELOG | 1 + program/include/rcmail.php | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'CHANGELOG') diff --git a/CHANGELOG b/CHANGELOG index 4f5ace427..36e80f354 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix invalid error message on deleting mail from read only folder (#1488694) - Fix error where session wasn't updated after folder rename/delete (#1488692) - Replace data URIs of images (pasted in HTML editor) with inline attachments (#1488502) - Fix PLAIN authentication for some IMAP servers (#1488674) diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 02f38e647..5a9a1fa86 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -1774,10 +1774,7 @@ class rcmail extends rcube $err_code = $this->storage->get_error_code(); $res_code = $this->storage->get_response_code(); - if ($err_code < 0) { - $this->output->show_message('storageerror', 'error'); - } - else if ($res_code == rcube_storage::NOPERM) { + if ($res_code == rcube_storage::NOPERM) { $this->output->show_message('errornoperm', 'error'); } else if ($res_code == rcube_storage::READONLY) { @@ -1792,6 +1789,9 @@ class rcmail extends rcube $this->output->show_message('servererrormsg', 'error', array('msg' => $err_str)); } } + else if ($err_code < 0) { + $this->output->show_message('storageerror', 'error'); + } else if ($fallback) { $this->output->show_message($fallback, 'error', $fallback_args); } -- cgit v1.2.3 From 41b3fe17824b1c8c00037addc0e9bdbc5506ece9 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 13 Sep 2012 15:32:43 +0200 Subject: Fix so "Edit as new" on draft creates a new message (#1488687) --- CHANGELOG | 1 + program/js/app.js | 2 +- skins/classic/includes/messagetoolbar.html | 2 +- skins/larry/includes/mailtoolbar.html | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) (limited to 'CHANGELOG') diff --git a/CHANGELOG b/CHANGELOG index 36e80f354..9c205c61d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix so "Edit as new" on draft creates a new message (#1488687) - Fix invalid error message on deleting mail from read only folder (#1488694) - Fix error where session wasn't updated after folder rename/delete (#1488692) - Replace data URIs of images (pasted in HTML editor) with inline attachments (#1488502) diff --git a/program/js/app.js b/program/js/app.js index 48de21764..2182a2b88 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -669,7 +669,7 @@ function rcube_webmail() this.load_identity(props, 'edit-identity'); else if (this.task == 'mail' && (cid = this.get_single_uid())) { url = { _mbox: this.env.mailbox }; - url[this.env.mailbox == this.env.drafts_mailbox ? '_draft_uid' : '_uid'] = cid; + url[this.env.mailbox == this.env.drafts_mailbox && props != 'new' ? '_draft_uid' : '_uid'] = cid; this.goto_url('compose', url, true); } break; diff --git a/skins/classic/includes/messagetoolbar.html b/skins/classic/includes/messagetoolbar.html index 3f4995b83..ecaf8f79b 100644 --- a/skins/classic/includes/messagetoolbar.html +++ b/skins/classic/includes/messagetoolbar.html @@ -45,7 +45,7 @@
  • -
  • +
  • diff --git a/skins/larry/includes/mailtoolbar.html b/skins/larry/includes/mailtoolbar.html index f750e061a..60cebe01b 100644 --- a/skins/larry/includes/mailtoolbar.html +++ b/skins/larry/includes/mailtoolbar.html @@ -37,7 +37,7 @@
    • -
    • +
    • -- cgit v1.2.3 From 4697c2cb776e1fb5c5dca44baa43733a37b00bcb Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 13 Sep 2012 20:33:31 +0200 Subject: Fix folder creation under public namespace root (#1488665) --- CHANGELOG | 1 + program/include/rcube_imap.php | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'CHANGELOG') diff --git a/CHANGELOG b/CHANGELOG index 9c205c61d..8c668da79 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix folder creation under public namespace root (#1488665) - Fix so "Edit as new" on draft creates a new message (#1488687) - Fix invalid error message on deleting mail from read only folder (#1488694) - Fix error where session wasn't updated after folder rename/delete (#1488692) diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index 0b2f84d4f..ebf31d578 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -3297,11 +3297,8 @@ class rcube_imap extends rcube_storage } // Get folder rights (MYRIGHTS) - if ($acl && !$options['noselect']) { - // skip shared roots - if (!$options['is_root'] || $options['namespace'] == 'personal') { - $options['rights'] = (array)$this->my_rights($folder); - } + if ($acl && ($rights = $this->my_rights($folder))) { + $options['rights'] = $rights; } // Set 'norename' flag -- cgit v1.2.3 From bf1d94076ddf79df7787f89ff373666d6fbcf30f Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 14 Sep 2012 14:25:59 +0200 Subject: Use IMAP BINARY (RFC3516) extension to fetch message/part bodies (experimental) --- CHANGELOG | 1 + program/include/rcube_imap_generic.php | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'CHANGELOG') diff --git a/CHANGELOG b/CHANGELOG index 36e80f354..babd05368 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Use IMAP BINARY (RFC3516) extension to fetch message/part bodies - Fix invalid error message on deleting mail from read only folder (#1488694) - Fix error where session wasn't updated after folder rename/delete (#1488692) - Replace data URIs of images (pasted in HTML editor) with inline attachments (#1488502) diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php index 25e6fc421..cce53aedc 100644 --- a/program/include/rcube_imap_generic.php +++ b/program/include/rcube_imap_generic.php @@ -2402,10 +2402,13 @@ class rcube_imap_generic $mode = 0; } + // Use BINARY extension when possible (and safe) + $binary = $mode && preg_match('/^[0-9.]+$/', $part) && $this->hasCapability('BINARY'); + $fetch_mode = $binary ? 'BINARY' : 'BODY'; + // format request - $reply_key = '* ' . $id; $key = $this->nextTag(); - $request = $key . ($is_uid ? ' UID' : '') . " FETCH $id (BODY.PEEK[$part])"; + $request = $key . ($is_uid ? ' UID' : '') . " FETCH $id ($fetch_mode.PEEK[$part])"; // send request if (!$this->putLine($request)) { @@ -2413,6 +2416,10 @@ class rcube_imap_generic return false; } + if ($binary) { + $mode = -1; + } + // receive reply line do { $line = rtrim($this->readLine(1024)); @@ -2457,13 +2464,13 @@ class rcube_imap_generic $prev = ''; while ($bytes > 0) { - $line = $this->readLine(4096); + $line = $this->readLine(8192); if ($line === NULL) { break; } - $len = strlen($line); + $len = strlen($line); if ($len > $bytes) { $line = substr($line, 0, $bytes); -- cgit v1.2.3 From f7c11e862f002d0cd03f2eb4bae10ce3de69dfd2 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 17 Sep 2012 10:48:15 +0200 Subject: List related text/html part as attachment in plain text mode (#1488677) --- CHANGELOG | 1 + program/include/rcube_message.php | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'CHANGELOG') diff --git a/CHANGELOG b/CHANGELOG index ce8547dd9..8a010a4d0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- List related text/html part as attachment in plain text mode (#1488677) - Use IMAP BINARY (RFC3516) extension to fetch message/part bodies - Fix folder creation under public namespace root (#1488665) - Fix so "Edit as new" on draft creates a new message (#1488687) diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php index 6af1d0133..fe2fcf354 100644 --- a/program/include/rcube_message.php +++ b/program/include/rcube_message.php @@ -494,8 +494,13 @@ class rcube_message } // list as attachment as well - if (!empty($mail_part->filename)) + if (!empty($mail_part->filename)) { + $this->attachments[] = $mail_part; + } + // list html part as attachment (here the part is most likely inside a multipart/related part) + else if ($this->parse_alternative && ($secondary_type == 'html' && !$this->opt['prefer_html'])) { $this->attachments[] = $mail_part; + } } // part message/* else if ($primary_type == 'message') { -- cgit v1.2.3