Added permission check to upload

This commit is contained in:
Tobias Reich 2014-05-16 23:24:11 +02:00
parent edca6c088a
commit 9db3d31cc0

View File

@ -43,6 +43,12 @@ class Photo extends Module {
# Check dependencies # Check dependencies
$this->dependencies(isset($this->database)); $this->dependencies(isset($this->database));
# Check permissions
if (hasPermissions(LYCHEE_UPLOADS_BIG)===false||hasPermissions(LYCHEE_UPLOADS_THUMB)===false) {
Log::error($this->database, __METHOD__, __LINE__, 'Wrong permissions in uploads/');
exit('Error: Wrong permissions in uploads-folder!');
}
# Call plugins # Call plugins
$this->plugins(__METHOD__, 0, func_get_args()); $this->plugins(__METHOD__, 0, func_get_args());