mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-21 00:46:27 +02:00
fix a few error, undefined vars, update phpstan, fix adapter data preset on edit phone
This commit is contained in:
parent
715afd79ec
commit
47b81c1af3
9 changed files with 34 additions and 64 deletions
|
@ -315,25 +315,14 @@ class Phone extends \descartes\Controller
|
|||
return $this->redirect(\descartes\Router::url('Phone', 'list'));
|
||||
}
|
||||
|
||||
$adapters = $this->internal_adapter->list_adapters();
|
||||
|
||||
foreach ($phones as &$phone)
|
||||
{
|
||||
$limits = $this->internal_phone->get_limits($phone['id']);
|
||||
$phone['limits'] = $limits;
|
||||
}
|
||||
|
||||
$phone_data = json_decode($phone['adapter_data'], true);
|
||||
$adapters = $this->internal_adapter->list_adapters();
|
||||
foreach ($adapters as &$adapter)
|
||||
{
|
||||
foreach ($adapter['meta_data_fields'] as &$data_field)
|
||||
{
|
||||
if (key_exists($data_field['name'], $phone_data))
|
||||
{
|
||||
$data_field['value'] = $phone_data[$data_field['name']];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->render('phone/edit', [
|
||||
'phones' => $phones,
|
||||
'adapters' => $adapters,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue