Commit 28ae0308 authored by Shakarim Sapa's avatar Shakarim Sapa

- Fix

parent 6ba432f8
......@@ -253,16 +253,12 @@ class TriggerTrigger extends \common\components\ActiveRecordModel
if ($params['unique']==true && $sendExist===true)
$send = false;
$dbg = array();
if ($send) {
$dbg['email'] = $email;
$dbg['trigger_id'] = $this->id;
$dbg['template'] = $this->messageTemplate->name;
$dbg['unique'] = (($params['unique']===true) ? 'Да' : 'Нет');
if (TriggerSchedule::find()->count()<3)
$count = 15;
if (TriggerSchedule::find()->count()<$count)
return TriggerSchedule::sendMessage($email, $this->message_template_id, $templateData, $this->id);
else
echo 'Единожды: '.$dbg['unique'].'; ID: '.$dbg['trigger_id'].'; EMAIL:'.$dbg['email'].'; Шаблон: '.$dbg['template'].'<br>';
echo 'Is activated more than '.$count.' triggers';
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment