Aleksander Machniak
2014-04-13 24e63e22188678407b180944f4c7bb9f494f09ee
Fix deleting/moving folders from folders with name "0", "00", etc.
3 files modified
6 ■■■■ changed files
program/include/rcmail.php 2 ●●● patch | view | raw | blame | history
program/steps/mail/copy.inc 2 ●●● patch | view | raw | blame | history
program/steps/mail/move_del.inc 2 ●●● patch | view | raw | blame | history
program/include/rcmail.php
@@ -2050,7 +2050,7 @@
            // create a per-folder UIDs array
            foreach ((array)$_uid as $uid) {
                list($uid, $mbox) = explode('-', $uid, 2);
                if (empty($mbox))
                if (!strlen($mbox))
                    $mbox = $_mbox;
                if ($uid == '*')
                    $result[$mbox] = $uid;
program/steps/mail/copy.inc
@@ -29,7 +29,7 @@
    $target = rcube_utils::get_input_value('_target_mbox', rcube_utils::INPUT_POST, true);
    foreach (rcmail::get_uids() as $mbox => $uids) {
        if ($mbox == $target)
        if ($mbox === $target)
            $copied++;
        else
            $copied += (int)$RCMAIL->storage->copy_message($uids, $target, $mbox);
program/steps/mail/move_del.inc
@@ -37,7 +37,7 @@
    $success = true;
    foreach (rcmail::get_uids() as $mbox => $uids) {
        if ($mbox == $target) {
        if ($mbox === $target) {
            $count += count($uids);
        }
        else if ($RCMAIL->storage->move_message($uids, $target, $mbox)) {