From ce709c6617ee80be7572f3e7d327e88bc514b597 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Sat, 28 Nov 2015 19:48:45 -0700 Subject: [PATCH] Add option to get the mac address from &name=SEPxxxxx --- app/provision/index.php | 9 +++++++++ resources/templates/provision/cisco/7940/directory.xml | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/provision/index.php b/app/provision/index.php index efd76559bd..df3d72fa91 100644 --- a/app/provision/index.php +++ b/app/provision/index.php @@ -42,6 +42,15 @@ openlog("fusion-provisioning", LOG_PID | LOG_PERROR, LOG_LOCAL0); // $device_template = check_str($_REQUEST['template']); //} +//get the mac address for Cisco 79xx in the URL as &name=SEP000000000000 + if (empty($mac)){ + $name = check_str($_REQUEST['name']); + if (substr($name, 0, 3) == "SEP") { + $mac = substr($name, 3, 12); + unset($name); + } + } + //check alternate MAC source if (empty($mac)){ //set the http user agent diff --git a/resources/templates/provision/cisco/7940/directory.xml b/resources/templates/provision/cisco/7940/directory.xml index f3f7b94470..2aeda06113 100644 --- a/resources/templates/provision/cisco/7940/directory.xml +++ b/resources/templates/provision/cisco/7940/directory.xml @@ -4,16 +4,16 @@ Enterprise - http://{$domain_name}/app/provision?mac={$mac}&file=directory-enterprise.xml + http://{$domain_name}/app/provision?file=directory-enterprise.xml Speed Dial - http://{$domain_name}/app/provision/?mac={$mac}&file=directory-speed_dial.xml + http://{$domain_name}/app/provision/?file=directory-speed_dial.xml Select