alecpl
2011-10-19 a561cd35b8eb4c91e634a590774b8d18ed5b8a4a
- Fix handling of folder creation error while moving/copying message


1 files modified
20 ■■■■ changed files
program/include/rcube_imap.php 20 ●●●● patch | view | raw | blame | history
program/include/rcube_imap.php
@@ -2586,10 +2586,14 @@
        // 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 @@
        // 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