summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap_generic.php
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/include/rcube_imap_generic.php
parentd2b27d11759cd1c668293a569aed1afaa7cfd741 (diff)
- Fix handling of folders with name "0" (#1487119)
Diffstat (limited to 'program/include/rcube_imap_generic.php')
-rw-r--r--program/include/rcube_imap_generic.php17
1 files changed, 5 insertions, 12 deletions
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php
index 864c57193..8ee17c2ee 100644
--- a/program/include/rcube_imap_generic.php
+++ b/program/include/rcube_imap_generic.php
@@ -801,7 +801,7 @@ class rcube_imap_generic
function select($mailbox)
{
- if (empty($mailbox)) {
+ if (!strlen($mailbox)) {
return false;
}
@@ -852,7 +852,7 @@ class rcube_imap_generic
*/
function status($mailbox, $items=array())
{
- if (empty($mailbox)) {
+ if (!strlen($mailbox)) {
return false;
}
@@ -886,11 +886,12 @@ class rcube_imap_generic
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 @@ class rcube_imap_generic
function copy($messages, $from, $to)
{
- if (empty($from) || empty($to)) {
- return false;
- }
-
if (!$this->select($from)) {
return false;
}
@@ -1638,10 +1635,6 @@ class rcube_imap_generic
function move($messages, $from, $to)
{
- if (!$from || !$to) {
- return false;
- }
-
$r = $this->copy($messages, $from, $to);
if ($r) {
@@ -1881,7 +1874,7 @@ class rcube_imap_generic
private function _listMailboxes($ref, $mailbox, $subscribed=false,
$status_opts=array(), $select_opts=array())
{
- if (empty($mailbox)) {
+ if (!strlen($mailbox)) {
$mailbox = '*';
}