Copy of the domain array and used it in dialplan import
This commit is contained in:
@@ -132,10 +132,17 @@
|
|||||||
//add the domain name
|
//add the domain name
|
||||||
$domain_enabled = 'true';
|
$domain_enabled = 'true';
|
||||||
$domain_uuid = uuid();
|
$domain_uuid = uuid();
|
||||||
|
|
||||||
|
//build the domain array
|
||||||
$array['domains'][0]['domain_uuid'] = $domain_uuid;
|
$array['domains'][0]['domain_uuid'] = $domain_uuid;
|
||||||
$array['domains'][0]['domain_name'] = $domain_name;
|
$array['domains'][0]['domain_name'] = $domain_name;
|
||||||
$array['domains'][0]['domain_enabled'] = $domain_enabled;
|
$array['domains'][0]['domain_enabled'] = $domain_enabled;
|
||||||
$array['domains'][0]['domain_description'] = $domain_description;
|
$array['domains'][0]['domain_description'] = $domain_description;
|
||||||
|
|
||||||
|
//create a copy of the domain array as the database save method empties the array that we still need.
|
||||||
|
$domain_array = $array;
|
||||||
|
|
||||||
|
//add the new domain
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$database->app_name = 'domains';
|
$database->app_name = 'domains';
|
||||||
$database->app_uuid = '8b91605b-f6d2-42e6-a56d-5d1ded01bb44';
|
$database->app_uuid = '8b91605b-f6d2-42e6-a56d-5d1ded01bb44';
|
||||||
@@ -145,7 +152,7 @@
|
|||||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/dialplans/app_config.php")) {
|
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/dialplans/app_config.php")) {
|
||||||
//import the dialplans
|
//import the dialplans
|
||||||
$dialplan = new dialplan;
|
$dialplan = new dialplan;
|
||||||
$dialplan->import($array['domains']);
|
$dialplan->import($domain_array['domains']);
|
||||||
unset($array);
|
unset($array);
|
||||||
|
|
||||||
//add xml for each dialplan where the dialplan xml is empty
|
//add xml for each dialplan where the dialplan xml is empty
|
||||||
|
|||||||
Reference in New Issue
Block a user