diff --git a/htdocs/manageFilesFolders.php b/htdocs/manageFilesFolders.php index 5fd3ca310..4f8d6c59f 100755 --- a/htdocs/manageFilesFolders.php +++ b/htdocs/manageFilesFolders.php @@ -63,14 +63,14 @@ */ if ($_POST['ACTION'] == "fileUpload") { /* - * I spent 3 hours trying to find out why when I upload multiples file $_FILES return empty, - * I did noticed it was only when I select files that exceed 3m so I thought it was something - * related to the MAX_UPLOAD_SIZE that for my surprice came as default as 20m which was very - * confusing. Later I discovery the problem was in the POST_MAX_SIZE been 3m, so it happen - * that not only MAX_UPLOAD_SIZE is responsible and that is why I'd like to know there is no + * I spent 3 hours trying to find out why when I upload multiples file $_FILES return empty, + * I did noticed it was only when I select files that exceed 3m so I thought it was something + * related to the MAX_UPLOAD_SIZE that for my surprice came as default as 20m which was very + * confusing. Later I discovery the problem was in the POST_MAX_SIZE been 3m, so it happen + * that not only MAX_UPLOAD_SIZE is responsible and that is why I'd like to know there is no * error message that shows the cause. - */ - + */ + $uFiles = getFiles(); //print "
"; print_r($uFiles); print ""; //??? // are there any files? @@ -82,7 +82,7 @@ if (count($uFiles['ufile']) == 0) { // if 0 there are no files $messageWarning .= "
No files were uploaded.
"; - } + } /* * let's start building the path to move the files to * as a relative path. @@ -112,7 +112,7 @@ if(!file_exists($Audio_Folders_Path . "/" . $moveFolder)) { // no, so create the folder $exec = 'mkdir "' . $moveFolder . '"; chown -R pi:www-data "' . $moveFolder . '"; sudo chmod -R 777 "' . $moveFolder . '"'; - exec($exec); + exec($exec); $messageAction .= "Will create new folder and move files to: '" . $moveFolder . "'"; } else { // folder exists already :( @@ -126,7 +126,7 @@ if(realpath($moveFolder) == realpath($Audio_Folders_Path)) { $messageWarning .= $lang['manageFilesFoldersErrorNoNewFolder']; } - + // if no error message if ($messageWarning == "") { // move files to folder @@ -161,12 +161,12 @@ if($messageWarning == "") { /* * create folder - */ + */ $exec = 'mkdir "'.$Audio_Folders_Path.'/'.$newDirPathRel.'"; sudo chmod -R 777 "'.$Audio_Folders_Path.'/'.$newDirPathRel.'"; chown -R pi:www-data "' . $Audio_Folders_Path.'/'.$newDirPathRel . '"'; exec($exec); $messageSuccess = "".$lang['manageFilesFoldersSuccessNewFolder']." '".$newDirPathRel."'
"; - - + + } } @@ -278,13 +278,6 @@ } } - // check if we can preselect an audiofolder if NOT a foldername was posted - if (!isset($fpost['folder'])) { - if (array_key_exists($fpost['cardID'], $shortcuts)) { - $fpost['folder'] = $shortcuts[$fpost['cardID']]; - } - } - // go through all folders foreach ($audiofolders as $keyfolder => $audiofolder) { @@ -340,19 +333,19 @@ class="form-control input-md" type="text"> -