diff --git a/controllers/receiveds.php b/controllers/receiveds.php index 517ba50..a50d0c6 100755 --- a/controllers/receiveds.php +++ b/controllers/receiveds.php @@ -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,