mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Change mkdir to recursive.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
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.
|
||||
|
||||
Contributor(s):
|
||||
@@ -51,7 +51,7 @@
|
||||
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name'];
|
||||
|
||||
//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
|
||||
$dir_fax_inbox = $fax_dir.'/'.$fax_extension.'/inbox';
|
||||
$dir_fax_sent = $fax_dir.'/'.$fax_extension.'/sent';
|
||||
@@ -59,19 +59,19 @@
|
||||
|
||||
//make sure the directories exist
|
||||
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)) {
|
||||
mkdir($fax_dir.'/'.$fax_extension, 0770, false);
|
||||
mkdir($fax_dir.'/'.$fax_extension, 0770, true);
|
||||
}
|
||||
if (!is_dir($dir_fax_inbox)) {
|
||||
mkdir($dir_fax_inbox, 0770, false);
|
||||
mkdir($dir_fax_inbox, 0770, true);
|
||||
}
|
||||
if (!is_dir($dir_fax_sent)) {
|
||||
mkdir($dir_fax_sent, 0770, false);
|
||||
mkdir($dir_fax_sent, 0770, true);
|
||||
}
|
||||
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