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'] != '')
|
if (isset($_GET['tags']) && $_GET['tags'] != '')
|
||||||
$tags = explode(',', $_GET['tags']);
|
$tags = explode(',', $_GET['tags']);
|
||||||
|
|
||||||
$mailboxes = mailbox('get', 'mailboxes', $object, $tags);
|
if ($tags === null) {
|
||||||
if (!empty($mailboxes)) {
|
$data = mailbox('get', 'mailbox_details', $object);
|
||||||
foreach ($mailboxes as $mailbox) {
|
} else {
|
||||||
if ($details = mailbox('get', 'mailbox_details', $mailbox)) $data[] = $details;
|
$mailboxes = mailbox('get', 'mailboxes', $object, $tags);
|
||||||
else continue;
|
if (is_array($mailboxes)) {
|
||||||
|
foreach ($mailboxes as $mailbox) {
|
||||||
|
if ($details = mailbox('get', 'mailbox_details', $mailbox))
|
||||||
|
$data[] = $details;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
process_get_return($data);
|
process_get_return($data);
|
||||||
|
Loading…
Reference in New Issue
Block a user