Merge branch 'develop' of gitlab.antadis.net:dev-antadis/bebeboutik into develop
This commit is contained in:
commit
e03d845691
@ -88,12 +88,13 @@ class Ant_Alert extends Module
|
||||
global $cookie;
|
||||
|
||||
$alert = AntAlert::getAlertByContact((int)$params['id_contact']);
|
||||
if($alert && $alert->enabled == 1) {
|
||||
if($alert && (int)$alert->enabled == 1) {
|
||||
$date = new Datetime($alert->date_last_sent);
|
||||
$now = new Datetime;
|
||||
|
||||
$dteDiff = $date->diff($now);
|
||||
if ((int)$dteDiff->format("%H") >= $alert->hours) { // prod
|
||||
if ((int)$dteDiff->format("%H") >= (int)$alert->hours) { // prod
|
||||
|
||||
$open_messages = Db::getInstance()->getRow('
|
||||
SELECT COUNT(*) as total
|
||||
FROM '._DB_PREFIX_.'customer_thread ct
|
||||
@ -113,7 +114,7 @@ class Ant_Alert extends Module
|
||||
$data = array(
|
||||
'{limit}' => (int)$alert->limit,
|
||||
'{hours}' => (int)$alert->hours,
|
||||
'{contact}' => (int)$contact->name,
|
||||
'{contact}' => $contact->name,
|
||||
);
|
||||
foreach ($to as $email) {
|
||||
if(Mail::Send(2, 'ant_alert', 'Alert error', $data, $to)) {
|
||||
|
Loading…
Reference in New Issue
Block a user