diff --git a/bin/v-change-fs-file-permission b/bin/v-change-fs-file-permission index 2b60865a..29e47bab 100755 --- a/bin/v-change-fs-file-permission +++ b/bin/v-change-fs-file-permission @@ -41,7 +41,7 @@ if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then fi # Changing file permissions -sudo -u $user chmod $permisions "$src_file" >/dev/null 2>&1 +sudo -u $user chmod $permissions "$src_file" >/dev/null 2>&1 if [ $? -ne 0 ]; then echo "Error: access permission on $src_file was not changed" exit 3 diff --git a/web/file_manager/UploadHandler.php b/web/file_manager/UploadHandler.php index fb77be1d..56b67c54 100644 --- a/web/file_manager/UploadHandler.php +++ b/web/file_manager/UploadHandler.php @@ -84,7 +84,7 @@ class UploadHandler // The php.ini settings upload_max_filesize and post_max_size // take precedence over the following max_file_size setting: 'max_file_size' => null, - 'min_file_size' => 1, + 'min_file_size' => 0, // The maximum number of files for the upload directory: 'max_number_of_files' => null, // Defines which files are handled as image files: diff --git a/web/js/file_manager.js b/web/js/file_manager.js index 8167753a..d54097c8 100644 --- a/web/js/file_manager.js +++ b/web/js/file_manager.js @@ -1237,7 +1237,7 @@ FM.unpackItem = function() { var tpl = Tpl.get('popup_unpack', 'FM'); tpl.set(':FILENAME', src.name); - tpl.set(':DST_DIRNAME', dst + '/' + src.name); + tpl.set(':DST_DIRNAME', (dst + '/' + src.name).replace('//', '/')); FM.popupOpen(tpl.finalize()); } @@ -1275,7 +1275,7 @@ FM.packItem = function() { var tpl = Tpl.get('popup_pack', 'FM'); tpl.set(':FILENAME', src.name); - tpl.set(':DST_DIRNAME', dst + '/' + src.name + '.tar.gz'); + tpl.set(':DST_DIRNAME', (dst + '/' + src.name + '.tar.gz').replace('//', '/')); FM.popupOpen(tpl.finalize()); } @@ -1448,7 +1448,7 @@ FM.copyItems = function() { var tpl = Tpl.get('popup_copy', 'FM'); tpl.set(':SRC_FILENAME', src.full_path); - tpl.set(':DST_FILENAME', dst + '/' + src.name); + tpl.set(':DST_FILENAME', (dst + '/' + src.name).replace('//', '/')); FM.popupOpen(tpl.finalize()); } @@ -2081,7 +2081,14 @@ $(document).ready(function() { FM.open(src.full_path, FM.CURRENT_TAB); } else { - FM.openFile(src.full_path, FM.CURRENT_TAB, elm); + if(FM.IMG_FILETYPES.indexOf(src.filetype) >= 0 && src.filetype.length > 0) { + //FM.IMAGES[tab][FM.IMAGES[tab].length] = {'img': "/view/file/?path=/home/admin/"+o.name+"&raw=true", 'thumb': "/view/file/?path=/home/admin/"+o.name//+"&raw=true", 'id': 'img-'+i}; + //cl_act = 'onClick="FM.fotoramaOpen(\'' + tab + '\', \'img-' + i +'\')"'; + FM.fotoramaOpen(tab, 'img-' + elm.index()); + } + else { + FM.openFile(src.full_path, FM.CURRENT_TAB, elm); + } } } },{