When picking up the domain_uuid get also get the device_uuid.

This commit is contained in:
FusionPBX
2020-06-11 22:46:39 -06:00
committed by GitHub
parent 47c8ceb521
commit 7647e6efcc

View File

@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Copyright (C) 2008-2019 All Rights Reserved.
Copyright (C) 2008-2020 All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
@@ -136,16 +136,21 @@
}
}
//get the domain_uuid
$sql = "select device_uuid, domain_uuid from v_devices ";
$sql .= "where device_mac_address = :mac ";
$parameters['mac'] = $mac;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row)) {
$domain_uuid = $row['domain_uuid'];
$device_uuid = $row['device_uuid'];
$_SESSION['domain_uuid'] = $domain_uuid;
}
unset($sql, $parameters);
//get the domain_name and domain_uuid
if ($_SESSION['provision']['http_domain_filter']['boolean'] == "false") {
//get the domain_uuid
$sql = "select domain_uuid from v_devices ";
$sql .= "where device_mac_address = :mac ";
$parameters['mac'] = $mac;
$database = new database;
$domain_uuid = $database->select($sql, $parameters, 'column');
$_SESSION['domain_uuid'] = $domain_uuid;
unset($sql, $parameters);
//get the domain name
$domain_name = $_SESSION['domains'][$domain_uuid]['domain_name'];
@@ -473,4 +478,9 @@
echo $file_contents;
closelog();
//device logs
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/device_logs/app_config.php")){
require_once "app/domains/device_logs/resources/device_logs.php";
}
?>