add actual usage of data on numbers

This commit is contained in:
osaajani 2022-03-19 22:56:56 +01:00
parent cf7fa2784b
commit 5c69237169
3 changed files with 22 additions and 2 deletions

View File

@ -1 +1 @@
v3.3.0
v3.3.1

View File

@ -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'])
{

View File

@ -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;