Change mkdir to recursive.
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
Portions created by the Initial Developer are Copyright (C) 2008-2021
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name'];
|
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name'];
|
||||||
|
|
||||||
//get the fax extension
|
//get the fax extension
|
||||||
if (strlen($fax_extension) > 0) {
|
if (is_numeric($fax_extension) > 0) {
|
||||||
//set the fax directories. example /usr/local/freeswitch/storage/fax/329/inbox
|
//set the fax directories. example /usr/local/freeswitch/storage/fax/329/inbox
|
||||||
$dir_fax_inbox = $fax_dir.'/'.$fax_extension.'/inbox';
|
$dir_fax_inbox = $fax_dir.'/'.$fax_extension.'/inbox';
|
||||||
$dir_fax_sent = $fax_dir.'/'.$fax_extension.'/sent';
|
$dir_fax_sent = $fax_dir.'/'.$fax_extension.'/sent';
|
||||||
@@ -59,19 +59,19 @@
|
|||||||
|
|
||||||
//make sure the directories exist
|
//make sure the directories exist
|
||||||
if (!is_dir($_SESSION['switch']['storage']['dir'])) {
|
if (!is_dir($_SESSION['switch']['storage']['dir'])) {
|
||||||
mkdir($_SESSION['switch']['storage']['dir'], 0770, false);
|
mkdir($_SESSION['switch']['storage']['dir'], 0770, true);
|
||||||
}
|
}
|
||||||
if (!is_dir($fax_dir.'/'.$fax_extension)) {
|
if (!is_dir($fax_dir.'/'.$fax_extension)) {
|
||||||
mkdir($fax_dir.'/'.$fax_extension, 0770, false);
|
mkdir($fax_dir.'/'.$fax_extension, 0770, true);
|
||||||
}
|
}
|
||||||
if (!is_dir($dir_fax_inbox)) {
|
if (!is_dir($dir_fax_inbox)) {
|
||||||
mkdir($dir_fax_inbox, 0770, false);
|
mkdir($dir_fax_inbox, 0770, true);
|
||||||
}
|
}
|
||||||
if (!is_dir($dir_fax_sent)) {
|
if (!is_dir($dir_fax_sent)) {
|
||||||
mkdir($dir_fax_sent, 0770, false);
|
mkdir($dir_fax_sent, 0770, true);
|
||||||
}
|
}
|
||||||
if (!is_dir($dir_fax_temp)) {
|
if (!is_dir($dir_fax_temp)) {
|
||||||
mkdir($dir_fax_temp, 0770, false);
|
mkdir($dir_fax_temp, 0770, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user