From e7879e8b2ff972bc5d78820e0f5a0351fb0eb9e2 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 6 Dec 2016 10:42:05 -0700 Subject: [PATCH] Update device_profile_delete.php --- app/devices/device_profile_delete.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/devices/device_profile_delete.php b/app/devices/device_profile_delete.php index 56963ff7f3..2d259c9a69 100644 --- a/app/devices/device_profile_delete.php +++ b/app/devices/device_profile_delete.php @@ -66,11 +66,17 @@ else { } //write the provision files - require_once "app/provision/provision_write.php"; + if (strlen($_SESSION['provision']['path']['text']) > 0) { + if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/provision')) { + $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 +?>