Skip to content

Commit a557150

Browse files
author
A. Täffner
committed
1 parent 6847682 commit a557150

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

server/lib/classes/cron.d/300-quota_notify.inc.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ public function onRunJob() {
457457
'{database_name}' => $rec['database_name'],
458458
'{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'),
459459
'{used}' => $app->functions->formatBytes($monitor['size']),
460-
'{quota}' => $quota.' MB',
460+
'{quota}' => $app->functions->formatBytes($quota),
461461
'{ratio}' => number_format($used_ratio * 100, 2, '.', '').'%'
462462
);
463463

@@ -479,15 +479,13 @@ public function onRunJob() {
479479
//* reset notification date
480480
if($rec['last_quota_notification']) $app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => null), 'database_id', $rec['database_id']);
481481

482-
$app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => array("SQL" => "CURDATE()")), 'database_id', $rec['database_id']);
483-
484482
// send notification - everything ok again
485483
if($rec['last_quota_notification'] && $web_config['overquota_notify_onok'] == 'y' && ($web_config['overquota_db_notify_admin'] == 'y' || $web_config['overquota_db_notify_client'] == 'y')) {
486484
$placeholders = array(
487485
'{database_name}' => $rec['database_name'],
488486
'{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'),
489487
'{used}' => $app->functions->formatBytes($monitor['size']),
490-
'{quota}' => $quota.' MB',
488+
'{quota}' => $app->functions->formatBytes($quota),
491489
'{ratio}' => number_format($used_ratio * 100, 2, '.', '').'%'
492490
);
493491

0 commit comments

Comments
 (0)