mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Set provisioning variables use device_key_type as a prefix if it was provided.
This commit is contained in:
@@ -285,7 +285,7 @@ require_once "resources/require.php";
|
||||
}
|
||||
|
||||
//if $file is not provided then look for a default file that exists
|
||||
if (strlen($file) == 0) {
|
||||
if (strlen($file) == 0) {
|
||||
if (file_exists($template_directory."/".$device_template ."/{\$mac}")) {
|
||||
$file = "{\$mac}";
|
||||
}
|
||||
@@ -429,12 +429,18 @@ require_once "resources/require.php";
|
||||
$device_key_value = $row['device_key_value']; //1
|
||||
$device_key_label = $row['device_key_label']; //label
|
||||
//assign the variables
|
||||
if ($device_key_type == "line") {
|
||||
if (strlen($device_key_type) == 0) {
|
||||
$view->assign("key_id_".$device_key_id, $device_key_id);
|
||||
$view->assign("key_type_".$device_key_id, $device_key_type);
|
||||
$view->assign("key_value_".$device_key_id, $device_key_value);
|
||||
$view->assign("key_label_".$device_key_id, $device_key_label);
|
||||
}
|
||||
else {
|
||||
$view->assign($device_key_type."_key_id_".$device_key_id, $device_key_id);
|
||||
$view->assign($device_key_type."_key_type_".$device_key_id, $device_key_type);
|
||||
$view->assign($device_key_type."_key_value_".$device_key_id, $device_key_value);
|
||||
$view->assign($device_key_type."_key_label_".$device_key_id, $device_key_label);
|
||||
}
|
||||
}
|
||||
unset ($prep_statement);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user