mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-22 17:36:29 +02:00
Update phone to use name instead of number and update sended to use phone id instead of origin
This commit is contained in:
parent
62c7f69395
commit
d5be760843
12 changed files with 91 additions and 93 deletions
|
@ -44,6 +44,23 @@ namespace controllers\publics;
|
|||
$page = (int) $page;
|
||||
$limit = 25;
|
||||
$sendeds = $this->internal_sended->list_for_user($_SESSION['user']['id'], $limit, $page);
|
||||
|
||||
foreach ($sendeds as &$sended)
|
||||
{
|
||||
if ($sended['id_phone'] === null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$phone = $this->internal_phone->get_for_user($_SESSION['user']['id'], $sended['id_phone']);
|
||||
if (!$phone)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$sended['phone_name'] = $phone['name'];
|
||||
}
|
||||
|
||||
$this->render('sended/list', ['sendeds' => $sendeds, 'page' => $page, 'limit' => $limit, 'nb_results' => \count($sendeds)]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue