Further development and an issue

Phoca Commander - dual panel file manager for Joomla! CMS
over
Phoca Member
Phoca Member
Posts: 16
Joined: 08 Jul 2010, 14:23

Further development and an issue

Post by over »

Hi,
nice to be the first to post to Phoca Commander.

I installed it for test on a local system. Looks very promissing. :twisted:
Might be that it has to be used on a Linux/Unix system not on Win 7, at least for the privelege settings. 0755 and Co. This was probably the reason for the disappearing of an uploaded image file allthough I got a success message.

First the issue. You can edit an image file. i.e. you get a text input cursor in a textarea. I didn't try to save so I don't know what happens then.

Are you planning some basic image editing features? e,g. rotate, crop and resize would be very helpfull.

I'll upload it to a server as soon as I have time to test it there.

Best
Ove
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Further development and an issue

Post by Jan »

Hi, for now, there is not planned editing image as basic function of file manager should be set. But added to feature request list.

Not sure what you exactly men with "You can edit an image file. i.e. you get a text input cursor in a textarea. I didn't try to save so I don't know what happens then." - if you will not save anything, it will just stay unchanged :idea:

Jan
If you find Phoca extensions useful, please support the project
over
Phoca Member
Phoca Member
Posts: 16
Joined: 08 Jul 2010, 14:23

Re: Further development and an issue

Post by over »

Hi,
even if Commander is only for "real" experts you could add a check on filetypes that you can edit.
I now tested to save an image and this is destroyed,

I made some screenshots but can't see that any attachment is possible.

Hope you understand it without.
Edit a file destroys it. Probably only textfiles work. txt, css, js, php and maybe a few more.

Ove
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Further development and an issue

Post by Jan »

Aha, yes, now I understand, yes, maybe there can be some issues with encoding, etc. which can then damage the image content :idea:

The problem is when you will add some check on filetypes and you e.g. will forbid editing some files because of normal users and some expert will be limited because of this then it can be problematic - with the phoca commander you should have the options to do as much as possible as it should help you and other administrators to effectively administer your website. This is really problematic issue: should we forbid to change permissions (because changing it can be dangerous), should be forbid to move or delete files - in fact none of the functions included in Phoca Commander or any existing file manager is save when not correctly used.

But I will take a look at it - why the image content is damaged when saved in text editor (I think, there will be some encoding problem) :idea:

Thank you for the info.

Jan
If you find Phoca extensions useful, please support the project
over
Phoca Member
Phoca Member
Posts: 16
Joined: 08 Jul 2010, 14:23

Re: Further development and an issue

Post by over »

Hi,
Aha, yes, now I understand, yes, maybe there can be some issues with encoding, etc. which can then damage the image content :idea:[/quote

No encoding problem. You cant edit a binary file with a texteditor.
The problem is when you will add some check on filetypes and you e.g. will forbid editing some files because of normal users and some expert will be limited because of this then it can be problematic - with the phoca commander you should have the options to do as much as possible as it should help you and other administrators to effectively administer your website.
Agreed! (A directory top-level setting would though be usefull. e.g. you can't break the running server by changes to the images/ folder, only make it vulnerable.). But the program should protect against misstakes if this is possible.

The expert can easiliy make a misstake in this case. Mark the wrong file for edit and click the save & close button. -> he doesn't recognise the problem as the file is saved nice and quiet.
This is really problematic issue: should we forbid to change permissions (because changing it can be dangerous), should be forbid to move or delete files - in fact none of the functions included in Phoca Commander or any existing file manager is save when not correctly used.

But I will take a look at it - why the image content is damaged when saved in text editor (I think, there will be some encoding problem)
Suggestion: Add an allowed to edit file type list (endings not mime type like you have for the upload types.) Check it in the phocacommanderedit model. I guess the getSource method is called before the edit screen is loaded. Now the Component manager can include what he wants. Defaults e.g. .txt, .ini, .css, .htm, .html, ...more? I would not add .php, .js or .htaccess in the default list. I would add it on a test server if I see the need.

I hope this gives you an idea. :o

Ove
Post Reply