From d45f89d5fe1e4cce4a0cfe6914e0f8c55f5ff83d Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 6 Dec 2016 10:31:44 -0700 Subject: [PATCH] Update extension_edit.php Fixes a permission issue for extension edit. --- app/extensions/extension_edit.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index cd7d682942..5204c9ccda 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -771,9 +771,12 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { } //write the provision files - if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/provision')) { - require_once "app/provision/provision_write.php"; - $ext = new extension; + 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(); + } } //clear the cache