Ajout du nom du contact sur les SMS reçus
This commit is contained in:
parent
b21a0c9aba
commit
804f8379e9
|
@ -40,6 +40,16 @@
|
|||
//Récupération des SMS envoyés triés par date, du plus récent au plus ancien, par paquets de $limit, en ignorant les $offset premiers
|
||||
$receiveds = $db->getFromTableWhere('receiveds', [], 'at', true, $limit, $offset);
|
||||
|
||||
foreach ($receiveds as $key => $received)
|
||||
{
|
||||
if (!$contacts = $db->getFromTableWhere('contacts', ['number' => $received['send_by']]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$receiveds[$key]['send_by'] = $contacts[0]['name'] . ' (' . $received['send_by'] . ')';
|
||||
}
|
||||
|
||||
return $this->render('receiveds/showAll', array(
|
||||
'receiveds' => $receiveds,
|
||||
'page' => $page,
|
||||
|
|
Loading…
Reference in New Issue