diff --git a/app/fax/fax_edit.php b/app/fax/fax_edit.php index 8854dd43be..cc97110e05 100644 --- a/app/fax/fax_edit.php +++ b/app/fax/fax_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - 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); } }