From 44840971e8e405cc41f923eaff0a32d7accb496c Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Fri, 12 Nov 2010 05:47:04 -0500 Subject: [PATCH] - Fix handling of folders with name "0" (#1487119) --- program/include/rcube_imap_generic.php | 17 +++++------------ 1 files changed, 5 insertions(+), 12 deletions(-) diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php index 864c571..8ee17c2 100644 --- a/program/include/rcube_imap_generic.php +++ b/program/include/rcube_imap_generic.php @@ -801,7 +801,7 @@ function select($mailbox) { - if (empty($mailbox)) { + if (!strlen($mailbox)) { return false; } @@ -852,7 +852,7 @@ */ function status($mailbox, $items=array()) { - if (empty($mailbox)) { + if (!strlen($mailbox)) { return false; } @@ -886,11 +886,12 @@ function checkForRecent($mailbox) { - if (empty($mailbox)) { + if (!strlen($mailbox)) { $mailbox = 'INBOX'; } $this->select($mailbox); + if ($this->selected == $mailbox) { return $this->data['RECENT']; } @@ -1618,10 +1619,6 @@ function copy($messages, $from, $to) { - if (empty($from) || empty($to)) { - return false; - } - if (!$this->select($from)) { return false; } @@ -1638,10 +1635,6 @@ function move($messages, $from, $to) { - if (!$from || !$to) { - return false; - } - $r = $this->copy($messages, $from, $to); if ($r) { @@ -1881,7 +1874,7 @@ private function _listMailboxes($ref, $mailbox, $subscribed=false, $status_opts=array(), $select_opts=array()) { - if (empty($mailbox)) { + if (!strlen($mailbox)) { $mailbox = '*'; } -- Gitblit v1.9.1