first commit Multi restore in trash, focus on the new folder name

This commit is contained in:
Milos Holba
2020-12-29 11:39:37 +01:00
parent fed95cbd64
commit 64fd6a2265
18 changed files with 400 additions and 108 deletions

View File

@@ -559,6 +559,10 @@ function get_image_meta_data($file)
{
if (get_file_type_from_mimetype($file->getMimeType()) === 'jpeg') {
return exif_read_data($file);
return mb_convert_encoding(
exif_read_data($file), 'UTF8', 'UTF8'
);
}
}
@@ -733,3 +737,32 @@ function remove_accents($string) {
return $string;
}
/**
* Get all files from folder and get their folder location in VueFileManager directories
*
* @param $folders
* @param array $files
* @param array $path
* @return array
*/
function get_files_for_zip($folders, $files = [], $path = [])
{
// Return file list
if (!isset($folders->folders)) {
return $files;
}
// Push path
array_push($path, $folders->name);
// Write file list
foreach ($folders->files as $file) {
array_push($files, [
'name' => $file->name,
'basename' => $file->basename,
'folder_path' => implode('/', $path),
]);
}
return get_files_for_zip($folders->folders->first(), $files, $path);
}