diff --git a/controllers/internals/Media.php b/controllers/internals/Media.php index 25fb988..c9d2642 100644 --- a/controllers/internals/Media.php +++ b/controllers/internals/Media.php @@ -48,7 +48,7 @@ class Media extends StandardController if (!file_put_contents($new_file_path, 'a')) { - throw new \Exception('pute de merde'); + throw new \Exception('Cannot write file ' . $new_file_path); } if (!rename($tmpfile_path, $new_file_path)) @@ -56,16 +56,6 @@ class Media extends StandardController throw new \Exception('Cannot create file ' . $new_file_path); } - if (!chown($new_file_path, fileowner($user_path))) - { - throw new \Exception('Cannot give file ' . $new_file_path . ' to user : ' . fileowner($user_path)); - } - - if (!chgrp($new_file_path, filegroup($user_path))) - { - throw new \Exception('Cannot give file ' . $new_file_path . ' to group : ' . filegroup($user_path)); - } - if (!chmod($new_file_path, self::DEFAULT_CHMOD)) { throw new \Exception('Cannot give file ' . $new_file_path . ' rights : ' . self::DEFAULT_CHMOD);