From d2835f6a7322eafdd757bf0afed4ccb2d0a6ffe9 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 6 Dec 2016 11:19:10 -0700 Subject: [PATCH] Update device_delete.php --- app/devices/device_delete.php | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/app/devices/device_delete.php b/app/devices/device_delete.php index 0abf85ed0c..efa557d5c4 100644 --- a/app/devices/device_delete.php +++ b/app/devices/device_delete.php @@ -17,21 +17,25 @@ The Initial Developer of the Original Code is Mark J Crane - Copyright (C) 2008-2012 All Rights Reserved. + Copyright (C) 2008-2016 All Rights Reserved. Contributor(s): Mark J Crane */ -require_once "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('device_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_delete')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -71,11 +75,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: devices.php"); return; -?> \ No newline at end of file +?>