1
0
Fork 0
mirror of https://github.com/RaspbianFrance/raspisms.git synced 2025-05-15 20:46:26 +02:00

fix style

This commit is contained in:
osaajani 2021-01-14 03:32:17 +01:00
parent cc233f726a
commit aac464704e
34 changed files with 147 additions and 107 deletions
controllers/internals

View file

@ -244,7 +244,7 @@ namespace controllers\internals;
if (!isset($users_phones[$scheduled['id_user']]))
{
$phones = $internal_phone->gets_for_user($scheduled['id_user']);
$users_phones[$scheduled['id_user']] = $phones ? $phones : [];
$users_phones[$scheduled['id_user']] = $phones ?: [];
}
$phone_to_use = null;
@ -335,14 +335,12 @@ namespace controllers\internals;
if ((int) ($users_settings[$scheduled['id_user']]['templating'] ?? false))
{
$contact['datas'] = json_decode($contact['datas'], true);
//Add metas of contact by adding contact without datas
$metas = $contact;
unset($metas['datas']);
unset($metas['id_user']);
$datas = ['contact' => $contact['datas'], 'contact_metas' => $metas];
unset($metas['datas'], $metas['id_user']);
$datas = ['contact' => $contact['datas'], 'contact_metas' => $metas];
$render = $internal_templating->render($scheduled['text'], $datas);