Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix(Tinebase/Metrics): fix mail storage calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
pschuele committed May 24, 2023
1 parent 0f424ac commit 517f176
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/tine20/Tinebase/Server/RoutingTests.php
Expand Up @@ -157,7 +157,7 @@ public function testMetric()
$imapBackend = Tinebase_EmailUser::getInstance();
if ($imapBackend instanceof Tinebase_EmailUser_Imap_Dovecot) {
$imapUsageQuota = $imapBackend->getTotalUsageQuota();
$emailStorage = $imapUsageQuota['mailQuota'] * 1024 * 1024;
$emailStorage = $imapUsageQuota['mailQuota'];
self::assertEquals($emailStorage, $content['emailStorage']);
self::assertGreaterThanOrEqual(6, $content['usersWithSystemAccount']);
}
Expand Down
4 changes: 2 additions & 2 deletions tine20/Tinebase/Controller.php
Expand Up @@ -323,7 +323,7 @@ protected function _isSyncClient($accessLog)
ActiveSync_Server_Http::REQUEST_TYPE
));
}

/**
* check user status
*
Expand Down Expand Up @@ -1312,7 +1312,7 @@ public function getStatusMetrics($apiKey = null)

if ($imapBackend instanceof Tinebase_EmailUser_Imap_Dovecot) {
$imapUsageQuota = $imapBackend->getTotalUsageQuota();
$emailStorage = $imapUsageQuota['mailQuota'] * 1024 * 1024;
$emailStorage = $imapUsageQuota['mailQuota'];
$data = array_merge($data, ['emailStorage' => $emailStorage]);

// there are tine instances without felamimail that still have system mailaccounts
Expand Down

0 comments on commit 517f176

Please sign in to comment.