From ece088e18d9d021085f9acc6be8a1df02dfd0000 Mon Sep 17 00:00:00 2001 From: Alberto Date: Sun, 3 Jun 2018 18:40:44 +0200 Subject: [PATCH] Version 9.13.0 - multiple file selection: you can delete multiple files, you can select multiple file (n.b. if you select multiple files on stand alone mode it return a json list of urls, if you use editor with normal mode return only the first and if you use tinymce with responsivefilemanager plugin return all files on editor) - you can disable mime type renaming on config - blacklist extensions available on config - fixed precompiled test on duplication - rfm remember the last folder when return to filemanager - added mime type .rar - fixed folder permission to get config value - fixed an error on folder renaming - a lot of others bugs fixed --- changelog.txt | 15 + filemanager/config/config.php | 54 +++- filemanager/dialog.php | 17 +- filemanager/execute.php | 5 +- filemanager/include/mime_type_lib.php | 1 + filemanager/include/utils.php | 10 +- filemanager/upload.php | 264 ++++++++++-------- gulpfile.js | 4 + resources/assets/js/include.js | 42 +-- resources/assets/js/plugin.js | 17 +- .../js/plugin_responsivefilemanager_plugin.js | 6 +- resources/assets/less/style.less | 13 +- resources/tmp/.gitignore | 2 - 13 files changed, 268 insertions(+), 182 deletions(-) delete mode 100644 resources/tmp/.gitignore diff --git a/changelog.txt b/changelog.txt index d0061a5a..e079f742 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,20 @@ Responsive Filemanager Changelog + +********************************************************* +* RFM 9.13.0 +********************************************************* +- multiple file selection: you can delete multiple files, you can select multiple file (n.b. if you select multiple files on stand alone mode it return a json list of urls, if you use editor with normal mode return only the first and if you use tinymce with responsivefilemanager plugin return all files on editor) +- you can disable mime type renaming on config +- blacklist extensions available on config +- fixed precompiled test on duplication +- rfm remember the last folder when return to filemanager +- added mime type .rar +- fixed folder permission to get config value +- fixed an error on folder renaming +- a lot of others bugs fixed + + ********************************************************* * RFM 9.12.2 ********************************************************* diff --git a/filemanager/config/config.php b/filemanager/config/config.php index 20598040..4256fe03 100755 --- a/filemanager/config/config.php +++ b/filemanager/config/config.php @@ -97,6 +97,17 @@ 'thumbs_base_path' => '../thumbs/', + /* + |-------------------------------------------------------------------------- + | mime file control to define files extensions + |-------------------------------------------------------------------------- + | + | If you want to be forced to assign the extension starting from the mime type + | + */ + 'mime_extension_rename' => true, + + /* |-------------------------------------------------------------------------- | FTP configuration BETA VERSION @@ -131,6 +142,20 @@ 'ftp_base_url' => "http://host.com/testFTP", */ + /* + |-------------------------------------------------------------------------- + | Multiple files selection + |-------------------------------------------------------------------------- + | The user can delete multiple files, select all files , deselect all files + */ + 'multiple_selection' => true, + /* + | + | The user can have a select button that pass a json to external input or pass the first file selected to editor + | If you use responsivefilemanager tinymce extension can copy into editor multiple object like images, videos, audios, links in the same time + | + */ + 'multiple_selection_action_button' => true, /* |-------------------------------------------------------------------------- @@ -172,7 +197,7 @@ | in Megabytes | */ - 'MaxSizeUpload' => 10000, + 'MaxSizeUpload' => 1, /* |-------------------------------------------------------------------------- @@ -261,8 +286,8 @@ // // WATERMARK IMAGE // - //Watermark url or false - 'image_watermark' => false, + //Watermark path or false + 'image_watermark' => "../watermark.png", # Could be a pre-determined position such as: # tl = top left, # t = top (middle), @@ -278,7 +303,7 @@ # padding: If using a pre-determined position you can # adjust the padding from the edges by passing an amount # in pixels. If using co-ordinates, this value is ignored. - 'image_watermark_padding' => 0, + 'image_watermark_padding' => 10, //****************** // Default layout setting @@ -321,7 +346,7 @@ // if you want you can add html,css etc. // but for security reasons it's NOT RECOMMENDED! 'editable_text_file_exts' => array( 'txt', 'log', 'xml', 'html', 'css', 'htm', 'js' ), - + // Preview with Google Documents 'googledoc_enabled' => true, 'googledoc_file_exts' => array( 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx' , 'pdf', 'odt', 'odp', 'ods'), @@ -337,12 +362,19 @@ //********************** //Allowed extensions (lowercase insert) //********************** - 'ext_img' => array( 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'svg' ), //Images - 'ext_file' => array( 'doc', 'docx', 'rtf', 'pdf', 'xls', 'xlsx', 'txt', 'csv', 'html', 'xhtml', 'psd', 'sql', 'log', 'fla', 'xml', 'ade', 'adp', 'mdb', 'accdb', 'ppt', 'pptx', 'odt', 'ots', 'ott', 'odb', 'odg', 'otp', 'otg', 'odf', 'ods', 'odp', 'css', 'ai', 'kmz','dwg', 'dxf', 'hpgl', 'plt', 'spl', 'step', 'stp', 'iges', 'igs', 'sat', 'cgm'), //Files + 'ext_img' => array( 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'ico' ), //Images + 'ext_file' => array( 'doc', 'docx', 'rtf', 'pdf', 'xls', 'xlsx', 'txt', 'csv', 'html', 'xhtml', 'psd', 'sql', 'log', 'fla', 'xml', 'ade', 'adp', 'mdb', 'accdb', 'ppt', 'pptx', 'odt', 'ots', 'ott', 'odb', 'odg', 'otp', 'otg', 'odf', 'ods', 'odp', 'css', 'ai', 'kmz','dwg', 'dxf', 'hpgl', 'plt', 'spl', 'step', 'stp', 'iges', 'igs', 'sat', 'cgm', 'tiff'), //Files 'ext_video' => array( 'mov', 'mpeg', 'm4v', 'mp4', 'avi', 'mpg', 'wma', "flv", "webm" ), //Video 'ext_music' => array( 'mp3', 'mpga', 'm4a', 'ac3', 'aiff', 'mid', 'ogg', 'wav' ), //Audio 'ext_misc' => array( 'zip', 'rar', 'gz', 'tar', 'iso', 'dmg' ), //Archives + + //********************* + // If you insert an extensions blacklist array the filemanager don't check any extensions but simply block the extensions in the list + // otherwise check Allowed extensions configuration + //********************* + 'ext_blacklist' => false, //['jpg'], + /****************** * AVIARY config *******************/ @@ -389,8 +421,8 @@ 'fixed_path_from_filemanager' => array( '../test/', '../test1/' ), //fixed path of the image folder from the current position on upload folder 'fixed_image_creation_name_to_prepend' => array( '', 'test_' ), //name to prepend on filename 'fixed_image_creation_to_append' => array( '_test', '' ), //name to appendon filename - 'fixed_image_creation_width' => array( 300, 400 ), //width of image (you can leave empty if you set height) - 'fixed_image_creation_height' => array( 200, '' ), //height of image (you can leave empty if you set width) + 'fixed_image_creation_width' => array( 300, 400 ), //width of image + 'fixed_image_creation_height' => array( 200, 300 ), //height of image /* # $option: 0 / exact = defined size; # 1 / portrait = keep aspect set height; @@ -410,8 +442,8 @@ 'relative_path_from_current_pos' => array( './', './' ), //relative path of the image folder from the current position on upload folder 'relative_image_creation_name_to_prepend' => array( '', '' ), //name to prepend on filename 'relative_image_creation_name_to_append' => array( '_thumb', '_thumb1' ), //name to append on filename - 'relative_image_creation_width' => array( 300, 400 ), //width of image (you can leave empty if you set height) - 'relative_image_creation_height' => array( 200, '' ), //height of image (you can leave empty if you set width) + 'relative_image_creation_width' => array( 300, 400 ), //width of image + 'relative_image_creation_height' => array( 200, 300 ), //height of image /* # $option: 0 / exact = defined size; # 1 / portrait = keep aspect set height; diff --git a/filemanager/dialog.php b/filemanager/dialog.php index 7f467715..a7c5bfe0 100644 --- a/filemanager/dialog.php +++ b/filemanager/dialog.php @@ -44,6 +44,8 @@ $subdir_path = ''; if (isset($_GET['fldr']) && !empty($_GET['fldr'])) { $subdir_path = rawurldecode(trim(strip_tags($_GET['fldr']),"/")); +}elseif(isset($_SESSION['RF']['fldr']) && !empty($_SESSION['RF']['fldr'])){ + $subdir_path = rawurldecode(trim(strip_tags($_SESSION['RF']['fldr']),"/")); } if (strpos($subdir_path,'../') === FALSE && strpos($subdir_path,'./') === FALSE @@ -51,6 +53,7 @@ && strpos($subdir_path,'.\\') === FALSE) { $subdir = strip_tags($subdir_path) ."/"; + $_SESSION['RF']['fldr'] = $subdir_path; $_SESSION['RF']["filter"]=''; } else { $subdir = ''; } @@ -352,7 +355,6 @@