diff --git a/app/recordings/recordings.php b/app/recordings/recordings.php index 7ad6196347..e6da6cd97a 100644 --- a/app/recordings/recordings.php +++ b/app/recordings/recordings.php @@ -113,20 +113,20 @@ $_POST['a'] == "upload" && permission_exists('recording_upload') && $_POST['type'] == 'rec' - && is_uploaded_file($_FILES['ulfile']['tmp_name']) + && is_uploaded_file($_FILES['file']['tmp_name']) ) { //remove special characters - $recording_filename = str_replace(" ", "_", $_FILES['ulfile']['name']); + $recording_filename = str_replace(" ", "_", $_FILES['file']['name']); $recording_filename = str_replace("'", "", $recording_filename); //make sure the destination directory exists if (!is_dir($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'])) { - mkdir($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'], 0770, true); + mkdir($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'], 0770, false); } //move the uploaded files - move_uploaded_file($_FILES['ulfile']['tmp_name'], $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$recording_filename); + $result = move_uploaded_file($_FILES['file']['tmp_name'], $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$recording_filename); //clear the destinations session array if (isset($_SESSION['destinations']['array'])) { @@ -137,7 +137,7 @@ message::add($text['message-uploaded'].": ".htmlentities($recording_filename)); //set the file name to be inserted as the recording description - $recording_description = $_FILES['ulfile']['name']; + $recording_description = $_FILES['file']['name']; header("Location: recordings.php?rd=".urlencode($recording_description)); exit; } @@ -363,7 +363,7 @@ echo "\n"; echo "";