filemanager fix

This commit is contained in:
Serghey Rodin 2015-11-02 15:31:36 +02:00
parent 60ebfe321a
commit 8cc1ddf101
3 changed files with 10 additions and 5 deletions

View file

@ -28,8 +28,8 @@ input.save:active { border: 1px solid #FFCC00; background-color: #FFCC00; color:
.ace_gutter, .ace_gutter,
.ace_scroller { padding-top: 0px; } .ace_scroller { padding-top: 0px; }
.ace-twilight .ace_gutter-active-line { margin-top: 10px; } /*.ace-twilight .ace_gutter-active-line { margin-top: 10px; } */
.ace_gutter-cell { color: #777; } .ace_gutter-cell { color: #777; }
.ace_editor { font-size: 19px !important; } .ace_editor { font-size: 17px !important; font-family: "Courier New", Courier, "Lucida Console", Monaco, monospace !important; }

View file

@ -648,7 +648,12 @@ FM.generate_listing = function(reply, box) {
o.filetype = FM.getFileType(o.name); o.filetype = FM.getFileType(o.name);
if(FM.IMG_FILETYPES.indexOf(o.filetype) >= 0 && o.filetype.length > 0) { if(FM.IMG_FILETYPES.indexOf(o.filetype) >= 0 && o.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}; FM.IMAGES[tab][FM.IMAGES[tab].length++] =
{
'img': "/view/file/?path="+o.full_path+"&raw=true",
'thumb': "/view/file/?path="+o.full_path+"&raw=true",
'id': 'img-'+i
};
cl_act = 'onClick="FM.fotoramaOpen(\'' + tab + '\', \'img-' + i +'\')"'; cl_act = 'onClick="FM.fotoramaOpen(\'' + tab + '\', \'img-' + i +'\')"';
} }

View file

@ -478,7 +478,7 @@ class UploadHandler
} }
protected function sanitizeFileName($file) { protected function sanitizeFileName($file) {
$file = preg_replace("/[^a-z0-9\._-]+/", '', $file); $file = preg_replace("/[^A-Za-z0-9\._-]+/", '', $file);
return $file; return $file;
} }