summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-11-12 10:47:04 +0000
committeralecpl <alec@alec.pl>2010-11-12 10:47:04 +0000
commit44840971e8e405cc41f923eaff0a32d7accb496c (patch)
treee5bdb35c732708b4ae8652369b4e9a599f2d5d4c /program/steps/mail
parentd2b27d11759cd1c668293a569aed1afaa7cfd741 (diff)
- Fix handling of folders with name "0" (#1487119)
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/func.inc2
-rw-r--r--program/steps/mail/move_del.inc4
2 files changed, 3 insertions, 3 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 39551c1c0..be5c26142 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -46,7 +46,7 @@ if (!in_array($RCMAIL->action, $NOIMAP_ACTIONS) && !$RCMAIL->imap_connect()) {
}
// set imap properties and session vars
-if ($mbox = get_input_value('_mbox', RCUBE_INPUT_GPC))
+if (strlen(trim($mbox = get_input_value('_mbox', RCUBE_INPUT_GPC))))
$IMAP->set_mailbox(($_SESSION['mbox'] = $mbox));
else if ($IMAP)
$_SESSION['mbox'] = $IMAP->get_mailbox_name();
diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc
index 4f52a60ca..e64c32742 100644
--- a/program/steps/mail/move_del.inc
+++ b/program/steps/mail/move_del.inc
@@ -28,7 +28,7 @@ $old_count = $IMAP->messagecount(NULL, $IMAP->threading ? 'THREADS' : 'ALL');
$old_pages = ceil($old_count / $IMAP->page_size);
// move messages
-if ($RCMAIL->action=='moveto' && !empty($_POST['_uid']) && !empty($_POST['_target_mbox'])) {
+if ($RCMAIL->action=='moveto' && !empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) {
$count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST))));
$target = get_input_value('_target_mbox', RCUBE_INPUT_POST);
$mbox = get_input_value('_mbox', RCUBE_INPUT_POST);
@@ -116,7 +116,7 @@ else
$_SESSION['unseen_count'][$mbox] = $unseen_count;
}
- if ($RCMAIL->action=='moveto' && $target) {
+ if ($RCMAIL->action=='moveto' && strlen($target)) {
rcmail_send_unread_count($target, true);
}