|
|
@ -2932,6 +2932,10 @@ class rcube_imap extends rcube_storage
|
|
|
|
// unsubscribe non-existent folders, remove them from the list
|
|
|
|
// unsubscribe non-existent folders, remove them from the list
|
|
|
|
if (!empty($result) && $name == '*') {
|
|
|
|
if (!empty($result) && $name == '*') {
|
|
|
|
$existing = $this->list_folders($root, $name);
|
|
|
|
$existing = $this->list_folders($root, $name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Try to make sure the list of existing folders is not malformed,
|
|
|
|
|
|
|
|
// we don't want to unsubscribe existing folders on error
|
|
|
|
|
|
|
|
if (is_array($existing) && (!empty($root) || count($existing) > 1)) {
|
|
|
|
$nonexisting = array_diff($result, $existing);
|
|
|
|
$nonexisting = array_diff($result, $existing);
|
|
|
|
$result = array_diff($result, $nonexisting);
|
|
|
|
$result = array_diff($result, $nonexisting);
|
|
|
|
|
|
|
|
|
|
|
@ -2940,6 +2944,7 @@ class rcube_imap extends rcube_storage
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return $result;
|
|
|
|
return $result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|