diff --git a/app/devices/device_delete.php b/app/devices/device_delete.php index 0abf85ed0c..a9a5d40218 100644 --- a/app/devices/device_delete.php +++ b/app/devices/device_delete.php @@ -71,11 +71,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: devices.php"); return; -?> \ No newline at end of file +?>