mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
Ajout du nom du contact sur les SMS reçus
This commit is contained in:
parent
d744472490
commit
0a6630cb2b
1 changed files with 10 additions and 0 deletions
|
@ -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
|
//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);
|
$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(
|
return $this->render('receiveds/showAll', array(
|
||||||
'receiveds' => $receiveds,
|
'receiveds' => $receiveds,
|
||||||
'page' => $page,
|
'page' => $page,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue