Update provision.php

This commit is contained in:
FusionPBX
2019-09-10 23:32:13 -06:00
committed by GitHub
parent 1f78ecca5e
commit 451c3fe048

View File

@@ -946,18 +946,34 @@ include "root.php";
if (is_array($device_keys)) {
foreach($device_keys as $k => $field) {
if (strlen($field['device_key_uuid']) > 0) {
$device_keys[$k]['device_key_value'] = str_replace("\${".$name."}", $value, $field['device_key_value']);
$device_keys[$k]['device_key_extension'] = str_replace("\${".$name."}", $value, $field['device_key_extension']);
$device_keys[$k]['device_key_label'] = str_replace("\${".$name."}", $value, $field['device_key_label']);
$device_keys[$k]['device_key_icon'] = str_replace("\${".$name."}", $value, $field['device_key_icon']);
if (isset($field['device_key_value'])) {
$device_keys[$k]['device_key_value'] = str_replace("\${".$name."}", $value, $field['device_key_value']);
}
if (isset($field['device_key_extension'])) {
$device_keys[$k]['device_key_extension'] = str_replace("\${".$name."}", $value, $field['device_key_extension']);
}
if (isset($field['device_key_label'])) {
$device_keys[$k]['device_key_label'] = str_replace("\${".$name."}", $value, $field['device_key_label']);
}
if (isset($field['device_key_icon'])) {
$device_keys[$k]['device_key_icon'] = str_replace("\${".$name."}", $value, $field['device_key_icon']);
}
}
else {
if (is_array($field)) {
foreach($field as $key => $row) {
$device_keys[$k][$key]['device_key_value'] = str_replace("\${".$name."}", $value, $row['device_key_value']);
$device_keys[$k][$key]['device_key_extension'] = str_replace("\${".$name."}", $value, $row['device_key_extension']);
$device_keys[$k][$key]['device_key_label'] = str_replace("\${".$name."}", $value, $row['device_key_label']);
$device_keys[$k][$key]['device_key_icon'] = str_replace("\${".$name."}", $value, $row['device_key_icon']);
if (isset($row['device_key_value'])) {
$device_keys[$k][$key]['device_key_value'] = str_replace("\${".$name."}", $value, $row['device_key_value']);
}
if (isset($row['device_key_extension'])) {
$device_keys[$k][$key]['device_key_extension'] = str_replace("\${".$name."}", $value, $row['device_key_extension']);
}
if (isset($row['device_key_label'])) {
$device_keys[$k][$key]['device_key_label'] = str_replace("\${".$name."}", $value, $row['device_key_label']);
}
if (isset($row['device_key_icon'])) {
$device_keys[$k][$key]['device_key_icon'] = str_replace("\${".$name."}", $value, $row['device_key_icon']);
}
}
}
}