add actual usage of data on numbers
This commit is contained in:
parent
cf7fa2784b
commit
5c69237169
|
@ -11,6 +11,9 @@
|
|||
|
||||
namespace controllers\internals;
|
||||
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use Monolog\Logger;
|
||||
|
||||
class Scheduled extends StandardController
|
||||
{
|
||||
protected $model;
|
||||
|
@ -380,7 +383,12 @@ namespace controllers\internals;
|
|||
|
||||
if ((int) ($users_settings[$scheduled['id_user']]['templating'] ?? false))
|
||||
{
|
||||
$render = $internal_templating->render($scheduled['text']);
|
||||
$number['data'] = json_decode($number['data'] ?? '[]', true);
|
||||
|
||||
$metas = ['number' => $number['number']];
|
||||
$data = ['contact' => $number['data'], 'contact_metas' => $metas];
|
||||
|
||||
$render = $internal_templating->render($scheduled['text'], $data);
|
||||
|
||||
if (!$render['success'])
|
||||
{
|
||||
|
|
|
@ -294,6 +294,12 @@ namespace controllers\publics;
|
|||
}
|
||||
}
|
||||
|
||||
//Remove empty csv file input
|
||||
if ($csv_file && UPLOAD_ERR_NO_FILE === $csv_file['error'])
|
||||
{
|
||||
$csv_file = false;
|
||||
}
|
||||
|
||||
if (empty($text))
|
||||
{
|
||||
\FlashMessage\FlashMessage::push('danger', 'Vous ne pouvez pas créer un Sms sans message.');
|
||||
|
@ -502,6 +508,12 @@ namespace controllers\publics;
|
|||
}
|
||||
}
|
||||
|
||||
//Remove empty csv file input
|
||||
if ($csv_file && UPLOAD_ERR_NO_FILE === $csv_file['error'])
|
||||
{
|
||||
$csv_file = false;
|
||||
}
|
||||
|
||||
if (empty($text))
|
||||
{
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue