From e49141c747d9837de07887e87d3749cef14b2e5a Mon Sep 17 00:00:00 2001 From: Pierre-Lin Bonnemaison Date: Mon, 21 Sep 2015 22:08:54 +0200 Subject: [PATCH] Ajout du nom du contact sur la popup de reception des SMS --- controllers/receiveds.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/controllers/receiveds.php b/controllers/receiveds.php index a50d0c6..bb2854f 100755 --- a/controllers/receiveds.php +++ b/controllers/receiveds.php @@ -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);