mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-01-24 16:34:40 +08:00
Fix for /api/v1/get/mailbox/{email}
This commit is contained in:
parent
5613134fed
commit
187ddedf96
@ -989,11 +989,15 @@ if (isset($_GET['query'])) {
|
||||
if (isset($_GET['tags']) && $_GET['tags'] != '')
|
||||
$tags = explode(',', $_GET['tags']);
|
||||
|
||||
$mailboxes = mailbox('get', 'mailboxes', $object, $tags);
|
||||
if (!empty($mailboxes)) {
|
||||
foreach ($mailboxes as $mailbox) {
|
||||
if ($details = mailbox('get', 'mailbox_details', $mailbox)) $data[] = $details;
|
||||
else continue;
|
||||
if ($tags === null) {
|
||||
$data = mailbox('get', 'mailbox_details', $object);
|
||||
} else {
|
||||
$mailboxes = mailbox('get', 'mailboxes', $object, $tags);
|
||||
if (is_array($mailboxes)) {
|
||||
foreach ($mailboxes as $mailbox) {
|
||||
if ($details = mailbox('get', 'mailbox_details', $mailbox))
|
||||
$data[] = $details;
|
||||
}
|
||||
}
|
||||
}
|
||||
process_get_return($data);
|
||||
|
Loading…
Reference in New Issue
Block a user