Skip to content
Snippets Groups Projects
Commit 137ba9a8 authored by Thom's avatar Thom :tools:
Browse files

Send overtraffic warning only when web is not disabled (#3937)

parent b07e4294
No related branches found
No related tags found
1 merge request!1249Make disabling webs on overtraffic optional (#3937)
MIME-Version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
From: {admin_mail}
Reply-To: {admin_mail}
Subject: Website traffic notification
The website {domain} is over traffic.
MIME-Version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
From: {admin_mail}
Reply-To: {admin_mail}
Subject: Webverkeerslimiet bereikt
De website {domain} heeft het verkeerslimiet voor deze maand bereikt.
......@@ -86,6 +86,9 @@ class cronjob_quota_notify extends cronjob {
$app->dbmaster->datalogUpdate('web_domain', array("traffic_quota_lock" => 'y', "active" => 'n'), 'domain_id', $rec['domain_id']);
$app->log('Traffic quota for '.$rec['domain'].' exceeded. Disabling website.', LOGLEVEL_DEBUG);
}
else {
$app->log('Traffic quota for '.$rec['domain'].' exceeded.', LOGLEVEL_DEBUG);
}
//* Send traffic notifications
if($rec['traffic_quota_lock'] != 'y' && ($web_config['overtraffic_notify_admin'] == 'y' || $web_config['overtraffic_notify_client'] == 'y')) {
......@@ -111,7 +114,12 @@ class cronjob_quota_notify extends cronjob {
}
}
$this->_tools->send_notification_email('web_traffic_notification', $placeholders, $recipients);
if ($web_config['overtraffic_disable_web'] == 'y') {
$this->_tools->send_notification_email('web_traffic_notification', $placeholders, $recipients);
}
else {
$this->_tools->send_notification_email('web_traffic_notification_warn', $placeholders, $recipients);
}
}
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment