From cc712ea843da9967eb4a2f5bd9aca7154b94821a Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 6 Dec 2016 11:21:13 -0700 Subject: [PATCH] Update device_profile_delete.php --- app/devices/device_profile_delete.php | 32 +++++++++++++++++---------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/app/devices/device_profile_delete.php b/app/devices/device_profile_delete.php index 56963ff7f3..742c639b13 100644 --- a/app/devices/device_profile_delete.php +++ b/app/devices/device_profile_delete.php @@ -22,16 +22,20 @@ Contributor(s): Mark J Crane */ -require_once "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('device_profile_delete')) { - //access granted -} -else { - echo "access denied"; - exit; -} + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('device_profile_delete')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -66,11 +70,15 @@ else { } //write the provision files - require_once "app/provision/provision_write.php"; + if (strlen($_SESSION['provision']['path']['text']) > 0) { + $prov = new provision; + $prov->domain_uuid = $domain_uuid; + $response = $prov->write(); + } //set the message and redirect the user $_SESSION["message"] = $text['message-delete']; header("Location: device_profiles.php"); return; -?> \ No newline at end of file +?>