mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Update app_defaults.php
This commit is contained in:
@@ -66,8 +66,6 @@ if ($domains_processed == 1) {
|
||||
$sql = "select count(*) from v_device_vendors; ";
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, null, 'column');
|
||||
unset($sql);
|
||||
|
||||
if ($num_rows == 0) {
|
||||
|
||||
//get the vendor array
|
||||
@@ -86,38 +84,46 @@ if ($domains_processed == 1) {
|
||||
|
||||
//build the array
|
||||
if (is_array($vendors) && @sizeof($vendors) != 0) {
|
||||
foreach ($vendors as $index_1 => $vendor) {
|
||||
$x = 0; $y = 0; $z = 0;
|
||||
foreach ($vendors as $vendor) {
|
||||
//insert the data into the database
|
||||
$device_vendor_uuid = uuid();
|
||||
$array['device_vendors'][$index_1]['device_vendor_uuid'] = $device_vendor_uuid;
|
||||
$array['device_vendors'][$index_1]['name'] = $vendor['name'];
|
||||
$array['device_vendors'][$index_1]['enabled'] = 'true';
|
||||
$array['device_vendors'][$x]['device_vendor_uuid'] = $device_vendor_uuid;
|
||||
$array['device_vendors'][$x]['name'] = $vendor['name'];
|
||||
$array['device_vendors'][$x]['enabled'] = 'true';
|
||||
|
||||
//add the vendor functions
|
||||
if (is_array($vendor['functions']) && @sizeof($vendor['functions']) != 0) {
|
||||
foreach ($vendor['functions'] as $index_2 => $function) {
|
||||
if (is_array($vendor['functions']) && @sizeof($vendor['functions'])) {
|
||||
|
||||
foreach ($vendor['functions'] as $function) {
|
||||
//add the device vendor function
|
||||
$device_vendor_function_uuid = uuid();
|
||||
$array['device_vendor_functions'][$index_2]['device_vendor_uuid'] = $device_vendor_uuid;
|
||||
$array['device_vendor_functions'][$index_2]['device_vendor_function_uuid'] = $device_vendor_function_uuid;
|
||||
$array['device_vendor_functions'][$index_2]['name'] = $function['name'];
|
||||
$array['device_vendor_functions'][$index_2]['value'] = $function['value'];
|
||||
$array['device_vendor_functions'][$index_2]['enabled'] = 'true';
|
||||
$array['device_vendor_functions'][$index_2]['description'] = $function['description'];
|
||||
$array['device_vendor_functions'][$y]['device_vendor_uuid'] = $device_vendor_uuid;
|
||||
$array['device_vendor_functions'][$y]['device_vendor_function_uuid'] = $device_vendor_function_uuid;
|
||||
$array['device_vendor_functions'][$y]['name'] = $function['name'];
|
||||
$array['device_vendor_functions'][$y]['value'] = $function['value'];
|
||||
$array['device_vendor_functions'][$y]['enabled'] = 'true';
|
||||
$array['device_vendor_functions'][$y]['description'] = $function['description'];
|
||||
|
||||
//add the device vendor function groups
|
||||
if (is_array($function['groups']) && @sizeof($function['groups']) != 0) {
|
||||
foreach ($function['groups'] as $index_3 => $group_name) {
|
||||
$device_vendor_function_group_uuid = uuid();
|
||||
$array['device_vendor_function_groups'][$index_3]['device_vendor_function_group_uuid'] = $device_vendor_function_group_uuid;
|
||||
$array['device_vendor_function_groups'][$index_3]['device_vendor_function_uuid'] = $device_vendor_function_uuid;
|
||||
$array['device_vendor_function_groups'][$index_3]['device_vendor_uuid'] = $device_vendor_uuid;
|
||||
$array['device_vendor_function_groups'][$index_3]['group_name'] = $group_name;
|
||||
$array['device_vendor_function_groups'][$index_3]['group_uuid'] = $group_uuids[$group_name];
|
||||
foreach ($function['groups'] as $group_name) {
|
||||
$array['device_vendor_function_groups'][$z]['device_vendor_function_group_uuid'] = uuid();
|
||||
$array['device_vendor_function_groups'][$z]['device_vendor_function_uuid'] = $device_vendor_function_uuid;
|
||||
$array['device_vendor_function_groups'][$z]['device_vendor_uuid'] = $device_vendor_uuid;
|
||||
$array['device_vendor_function_groups'][$z]['group_name'] = $group_name;
|
||||
$array['device_vendor_function_groups'][$z]['group_uuid'] = $group_uuids[$group_name];
|
||||
$z++;
|
||||
}
|
||||
}
|
||||
|
||||
//increment the device vendor function index
|
||||
$y++;
|
||||
}
|
||||
}
|
||||
|
||||
//increment the devic vendor index
|
||||
$x++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,4 +149,5 @@ if ($domains_processed == 1) {
|
||||
unset($num_rows);
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user