diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-10-19 06:35:29 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-10-19 06:35:29 +0000 |
| commit | 97de73fe557a248ad14c8aef6ba90e78cd9efed1 (patch) | |
| tree | aba3ac777c4dccb8b13574f8929018c56f7d52ad /roundcubemail/program | |
| parent | 446650081d9dff29c55e209e4446ea51ff47a13d (diff) | |
- Fix handling of folder creation error while moving/copying message
git-svn-id: https://svn.roundcube.net/trunk@5347 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/include/rcube_imap.php | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php index c35c877e6..c07b39883 100644 --- a/roundcubemail/program/include/rcube_imap.php +++ b/roundcubemail/program/include/rcube_imap.php @@ -2586,10 +2586,14 @@ class rcube_imap // make sure mailbox exists if ($to_mbox != 'INBOX' && !$this->mailbox_exists($to_mbox)) { - if (in_array($to_mbox, $this->default_folders)) - $this->create_mailbox($to_mbox, true); - else + if (in_array($to_mbox, $this->default_folders)) { + if (!$this->create_mailbox($to_mbox, true)) { + return false; + } + } + else { return false; + } } $config = rcmail::get_instance()->config; @@ -2667,10 +2671,14 @@ class rcube_imap // make sure mailbox exists if ($to_mbox != 'INBOX' && !$this->mailbox_exists($to_mbox)) { - if (in_array($to_mbox, $this->default_folders)) - $this->create_mailbox($to_mbox, true); - else + if (in_array($to_mbox, $this->default_folders)) { + if (!$this->create_mailbox($to_mbox, true)) { + return false; + } + } + else { return false; + } } // copy messages |
