Fix deleting/moving folders from folders with name "0", "00", etc.

pull/176/head
Aleksander Machniak 10 years ago
parent a594999135
commit 24e63e2218

@ -2050,7 +2050,7 @@ class rcmail extends rcube
// 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;

@ -29,7 +29,7 @@ if (!empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) {
$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);

@ -37,7 +37,7 @@ if ($RCMAIL->action == 'move' && !empty($_POST['_uid']) && strlen($_POST['_targe
$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)) {

Loading…
Cancel
Save