[Web] Use api/v1/get/mailbox/reduced for faster loading of mailbox table

This commit is contained in:
andryyy
2021-03-19 16:33:50 +01:00
parent b82bf5073b
commit dd198747b7
4 changed files with 65 additions and 48 deletions

View File

@@ -841,6 +841,7 @@ if (isset($_GET['query'])) {
case "mailbox":
switch ($object) {
case "all":
case "reduced":
if (empty($extra)) {
$domains = mailbox('get', 'domains');
}
@@ -852,7 +853,7 @@ if (isset($_GET['query'])) {
$mailboxes = mailbox('get', 'mailboxes', $domain);
if (!empty($mailboxes)) {
foreach ($mailboxes as $mailbox) {
if ($details = mailbox('get', 'mailbox_details', $mailbox)) {
if ($details = mailbox('get', 'mailbox_details', $mailbox, $object)) {
$data[] = $details;
}
else {