Fix dialplans update $app_uuid handling in dialplan edit and database arrays

This commit is contained in:
markjcrane
2025-10-31 15:49:43 -06:00
parent 22e99a26c3
commit 1271063b00
2 changed files with 7 additions and 3 deletions

View File

@@ -89,6 +89,9 @@
if (!empty($_REQUEST["app_uuid"]) && is_uuid($_REQUEST["app_uuid"])) {
$app_uuid = $_REQUEST["app_uuid"];
}
else {
$app_uuid = null;
}
//get the http post values and set them as php variables
if (count($_POST) > 0) {
@@ -300,7 +303,7 @@
}
}
//update the dialplan xml by using the array
//update the dialplan_xml by using the array
$dialplans = new dialplan;
$dialplans->source = "details";
$dialplans->destination = "array";

View File

@@ -38,6 +38,7 @@
* @var string
*/
public $domain_uuid;
public $app_uuid;
/**
* declare public variables
@@ -551,10 +552,10 @@
foreach($database_array['dialplans'] as $row) {
if (!empty($row['dialplan_details'])) {
foreach($row['dialplan_details'] as $detail) {
if ($detail['dialplan_detail_enabled'] == true) {
if ($detail['dialplan_detail_enabled'] == 'true') {
$array[$id]['domain_uuid'] = $row['domain_uuid'];
$array[$id]['dialplan_uuid'] = $row['dialplan_uuid'];
$array[$id]['app_uuid'] = $row['app_uuid'];
$array[$id]['app_uuid'] = $row['app_uuid'] ?? '';
$array[$id]['dialplan_context'] = $row['dialplan_context'];
$array[$id]['dialplan_name'] = $row['dialplan_name'];
$array[$id]['dialplan_number'] = $row['dialplan_number'];