mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-22 09:26:27 +02:00
Ajout du nom du contact sur la popup de reception des SMS
This commit is contained in:
parent
0a6630cb2b
commit
fb32caaa81
1 changed files with 10 additions and 0 deletions
|
@ -67,6 +67,16 @@
|
|||
global $db;
|
||||
$now = new DateTime();
|
||||
$receiveds = $db->getReceivedsSince($now->format('Y-m-d'));
|
||||
|
||||
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'] . ')';
|
||||
}
|
||||
|
||||
$nbReceiveds = count($receiveds);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue