Account for dialplan_detail_enabled false

This commit is contained in:
FusionPBX 2023-12-08 16:19:17 -07:00 committed by GitHub
parent c7e687512f
commit dedafeccc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 21 deletions

View File

@ -596,11 +596,11 @@
//combines array dialplans and dialplan details arrays to match results from the database //combines array dialplans and dialplan details arrays to match results from the database
public function prepare_details($database_array) { public function prepare_details($database_array) {
$id = 0; $id = 0;
foreach($database_array['dialplans'] as $row) { foreach($database_array['dialplans'] as $row) {
if (!empty($row['dialplan_details'])) { if (!empty($row['dialplan_details'])) {
foreach($row['dialplan_details'] as $detail) { foreach($row['dialplan_details'] as $detail) {
if ($detail['dialplan_detail_enabled'] == 'true') {
$array[$id]['domain_uuid'] = $row['domain_uuid']; $array[$id]['domain_uuid'] = $row['domain_uuid'];
$array[$id]['dialplan_uuid'] = $row['dialplan_uuid']; $array[$id]['dialplan_uuid'] = $row['dialplan_uuid'];
$array[$id]['app_uuid'] = $row['app_uuid']; $array[$id]['app_uuid'] = $row['app_uuid'];
@ -624,6 +624,7 @@
} }
} }
} }
}
$this->dialplan_details = $array; $this->dialplan_details = $array;
} }
@ -1588,3 +1589,4 @@
} }
?> ?>