Device profile settings (#2165)

* Update app_config.php

* Update device_profile_edit.php

* Update device_setting_delete.php

* Update provision.php
This commit is contained in:
konradSC
2016-11-23 12:28:59 -07:00
committed by FusionPBX
parent 2c7715dcfd
commit a7b76b7a84
4 changed files with 163 additions and 2 deletions
@@ -472,6 +472,23 @@ include "root.php";
unset($prep_statement_3);
}
//get the device settings table in the provision category from the profile and update the provision array
if ((strlen($device_uuid) > 0) and (strlen($device_profile_uuid) > 0)) {
$sql = "SELECT * FROM v_device_settings ";
$sql .= "WHERE device_profile_uuid = '".$device_profile_uuid."' ";
$sql .= "AND device_setting_enabled = 'true' ";
$prep_statement = $this->db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
$result_count = count($result);
foreach($result as $row) {
$key = $row['device_setting_subcategory'];
$value = $row['device_setting_value'];
$provision[$key] = $value;
}
unset ($prep_statement);
}
//get the device settings table in the provision category and update the provision array
if (strlen($device_uuid) > 0) {
$sql = "SELECT * FROM v_device_settings ";