From a3c6ad6eb19cb01a99d7feb95e2db2bbe0bbe670 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 9 Nov 2019 13:12:23 -0700 Subject: [PATCH] Update domain_edit.php --- core/domains/domain_edit.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/core/domains/domain_edit.php b/core/domains/domain_edit.php index cc4599d43b..2b01b5961d 100644 --- a/core/domains/domain_edit.php +++ b/core/domains/domain_edit.php @@ -124,9 +124,18 @@ //add dialplans to the domain if (file_exists($_SERVER["PROJECT_ROOT"]."/app/dialplans/app_config.php")) { + //import the dialplans $dialplan = new dialplan; $dialplan->import($array['domains']); unset($array); + + //add xml for each dialplan where the dialplan xml is empty + $dialplans = new dialplan; + $dialplans->source = "details"; + $dialplans->destination = "database"; + $dialplans->context = $domain_name; + $dialplans->is_empty = "dialplan_xml"; + $array = $dialplans->xml(); } } } @@ -152,9 +161,18 @@ // add dialplans to the domain if (file_exists($_SERVER["PROJECT_ROOT"]."/app/dialplans/app_config.php")) { + //import the dialplans $dialplan = new dialplan; $dialplan->import($array['domains']); unset($array); + + //add xml for each dialplan where the dialplan xml is empty + $dialplans = new dialplan; + $dialplans->source = "details"; + $dialplans->destination = "database"; + $dialplans->context = $domain_name; + $dialplans->is_empty = "dialplan_xml"; + $array = $dialplans->xml(); } if ($original_domain_name != $domain_name) {