Admidio / admidio

Admidio is a free open source user management system for websites of organizations and groups. The system has a flexible role model so that it’s possible to reflect the structure and permissions of your organization.
https://www.admidio.org
GNU General Public License v2.0
307 stars 123 forks source link

Feature use filesystemutils #704

Closed ximex closed 6 years ago

ximex commented 6 years ago

use the new FileSystemUtils class and some code improvements

ximex commented 6 years ago

@Fasse please review and merge if all is ok

Fasse commented 6 years ago

@ximex before I start testing this, have you manually test your changes. Because this is something that could break our file handling ...

Fasse commented 6 years ago

I will check this after commit of menu so I could check compatibility also against those changes.

ximex commented 6 years ago

@Fasse now you could test. Fixed some small bugs

Fasse commented 6 years ago

There is a problem with the htaccess file. If the file doesn't exists, it won't be created with the new class. So the folder isn't protected.

ximex commented 6 years ago

On my server the creation of .htaccess works.

Which PHP Version? Windows or Linux? Any logs?

Fasse commented 6 years ago

I could reproduce it with my Mac and my Linux NAS.

To reproduce: I have a running Admidio installation folder adm_my_files and a htaccess file. Then I remove the htaccess file. Now go to downloads and create new folder -> no htaccess file is created

@ximex in which cases do we create that file?

ximex commented 6 years ago

only on update now. Look here: https://github.com/Admidio/admidio/blob/feature-use-filesystemutils/adm_program/installation/update_functions.php#L237 I could also add this code into common.php than it would be checked on any request. but i think on update it should be enough.

Fasse commented 6 years ago

Hmm, of you move your Installation to another webspace it should also be added. Check this at every request would be too mich, but maybe if we still handle with adm_my_files folder.

ximex commented 6 years ago

Or show it in the system-settings and add a button to create on if there is no .htaccess?

Fasse commented 6 years ago

Ok, also possible. But Check at update should still be there.

ximex commented 6 years ago

Ok than i will implement this

ximex commented 6 years ago

@Fasse done

ximex commented 6 years ago

@Fasse couldn't reproduce your problem. Please give more information.

Fasse commented 6 years ago

you can merge.