mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
quota needs a left join to report mailboxes without quota
This commit is contained in:
parent
027ef6bd18
commit
206fdb367f
@ -366,8 +366,8 @@ class Sql extends Mail\Smtp
|
||||
}
|
||||
if ($return_extra)
|
||||
{
|
||||
$join .= ' JOIN '.self::TABLE.' quota ON quota.account_id='.Api\Accounts\Sql::TABLE.'.account_id';
|
||||
$cols .= ',account_id,quota.mail_value AS quota';
|
||||
$join .= ' LEFT JOIN '.self::TABLE.' quota ON quota.account_id='.Api\Accounts\Sql::TABLE.'.account_id AND quota.mail_type='.self::TYPE_QUOTA;
|
||||
$cols .= ','.Api\Accounts\Sql::TABLE.'.account_id AS account_id,quota.mail_value AS quota';
|
||||
}
|
||||
$mailboxes = array();
|
||||
foreach($this->db->select(self::TABLE, $cols,
|
||||
@ -384,7 +384,7 @@ class Sql extends Mail\Smtp
|
||||
{
|
||||
$mailboxes[$row['uid']] = [
|
||||
'mbox' => $mailbox,
|
||||
'quota' => $row['quota'] ? $row['quota'] : $GLOBALS['egw_info']['server']['default_quota'],
|
||||
'quota' => !empty($row['quota']) ? $row['quota'] : $GLOBALS['egw_info']['server']['default_quota'],
|
||||
'groups' => array_values($GLOBALS['egw']->accounts->memberships($row['account_id'])),
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user