From a5e249db02bd0bb33f9b1c5769f4c669e6e7a369 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 2 Dec 2021 18:14:46 -0700 Subject: [PATCH] Use PHP mkdir function. --- app/dialplan_inbound/app_defaults.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/dialplan_inbound/app_defaults.php b/app/dialplan_inbound/app_defaults.php index 911ff1f94e..94eb8378a8 100644 --- a/app/dialplan_inbound/app_defaults.php +++ b/app/dialplan_inbound/app_defaults.php @@ -52,7 +52,9 @@ //if the public directory doesn't exist then create it if ($domains_processed == 1) { if (strlen($_SESSION['switch']['dialplan']['dir']) > 0) { - if (!is_dir($_SESSION['switch']['dialplan']['dir'].'/public')) { event_socket_mkdir($_SESSION['switch']['dialplan']['dir'].'/public'); } + if (!is_dir($_SESSION['switch']['dialplan']['dir'].'/public')) { + mkdir($_SESSION['switch']['dialplan']['dir'].'/public', 0770, false); + } } } @@ -61,7 +63,7 @@ //make sure the public directory and xml file exist if (strlen($_SESSION['switch']['dialplan']['dir']) > 0) { if (!is_dir($_SESSION['switch']['dialplan']['dir'].'/public'.$_SESSION['domains'][$domain_uuid]['domain_name'])) { - event_socket_mkdir($_SESSION['switch']['dialplan']['dir'].'/public/'.$_SESSION['domains'][$domain_uuid]['domain_name']); + mkdir($_SESSION['switch']['dialplan']['dir'].'/public/'.$_SESSION['domains'][$domain_uuid]['domain_name'], 0770, false); } $file = $_SESSION['switch']['dialplan']['dir']."/public/".$_SESSION['domains'][$domain_uuid]['domain_name'].".xml"; if (!file_exists($file)) { @@ -76,4 +78,4 @@ } } -?> \ No newline at end of file +?>