From 40b665fefa624fd01f1bf07436836beeadd55dbf Mon Sep 17 00:00:00 2001 From: markjcrane Date: Sat, 9 Jan 2016 09:52:27 -0700 Subject: [PATCH] Device File download format the mac address file name according to the requirements of the vendor. --- app/devices/device_edit.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index e7064dfeb6..2580cced3f 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -357,6 +357,10 @@ require_once "resources/require.php"; unset ($prep_statement); } +//format the mac address + $format = new provision(); + $formatted_mac_address = $format->format_mac($device_mac_address, $device_vendor); + //use the mac address to get the vendor if (strlen($device_vendor) == 0) { $template_array = explode("/", $device_template); @@ -553,7 +557,7 @@ require_once "resources/require.php"; else { $domain_name = $_SESSION['domain_name']; } - echo " window.location = 'https://".$domain_name."/app/provision?mac=$device_mac_address&file=' + d + '&content_type=application/octet-stream';\n"; + echo " window.location = 'https://".$domain_name."/app/provision?mac=".$formatted_mac_address."&file=' + d + '&content_type=application/octet-stream';\n"; echo " }\n"; echo "\n";