Update app_defaults.php

Adjust the indentation.
This commit is contained in:
FusionPBX 2016-07-01 16:49:12 -06:00 committed by GitHub
parent 2d6b1e5b8d
commit 4fc4d7e70e
1 changed files with 25 additions and 21 deletions

View File

@ -57,27 +57,31 @@
//get the $apps array from the installed apps from the core and mod directories //get the $apps array from the installed apps from the core and mod directories
if ($domains_processed == 1) { if ($domains_processed == 1) {
$xml_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/resources/switch/conf/dialplan/*.xml"); //get the array of xml files
foreach ($xml_list as &$xml_file) { $xml_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/resources/switch/conf/dialplan/*.xml");
//get and parse the xml
$xml_string = file_get_contents($xml_file); //dialplan class
//get the order number prefix from the file name $dialplan = new dialplan;
$name_array = explode('_', basename($xml_file));
if (is_numeric($name_array[0])) { //process the xml files
$dialplan_order = $name_array[0]; foreach ($xml_list as &$xml_file) {
} //get and parse the xml
else { $xml_string = file_get_contents($xml_file);
$dialplan_order = 0; //get the order number prefix from the file name
} $name_array = explode('_', basename($xml_file));
//dialplan class if (is_numeric($name_array[0])) {
$dialplan = new dialplan; $dialplan_order = $name_array[0];
$dialplan->dialplan_order = $dialplan_order; }
if ($display_type == "text") { else {
$dialplan->display_type = 'text'; $dialplan_order = 0;
} }
$dialplan->xml = $xml_string; $dialplan->dialplan_order = $dialplan_order;
$dialplan->import(); if ($display_type == "text") {
} $dialplan->display_type = 'text';
}
$dialplan->xml = $xml_string;
$dialplan->import();
}
} }
//add not found dialplan to inbound routes //add not found dialplan to inbound routes