Add line_keys to the deivice_lines array needed for Polycom.

This commit is contained in:
FusionPBX
2021-09-10 12:33:02 -06:00
committed by GitHub
parent 0f818697e1
commit f606c6ff3b

View File

@@ -719,8 +719,8 @@ include "root.php";
$parameters['device_profile_uuid'] = $device_profile_uuid;
$database = new database;
$keys = $database->select($sql, $parameters, 'all');
//add the profile keys to the device keys array
//add the profile keys to the device keys array
if (is_array($keys) && sizeof($keys) != 0) {
foreach($keys as $row) {
//set the variables
@@ -780,6 +780,12 @@ include "root.php";
//set the variables
$id = $row['device_key_id'];
$category = $row['device_key_category'];
$device_key_line = $row['device_key_line'];
//add line_keys to the polycom array
if ($row['device_key_vendor'] == 'polycom' && $row['device_key_type'] == 'line') {
$device_lines[$device_key_line]['line_keys'] = $row['device_key_value'];
}
//build the device keys array
$device_keys[$category][$id] = $row;