From e32241ddbcb131349fbe21fa24d11a56dcdf8b0d Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 23 Feb 2015 21:21:53 +0100 Subject: [PATCH] Changed thumbnail-only chmod to attachment-general chmod as recommended by mmn. Signed-off-by: Roland Haeder --- lib/default.php | 2 +- lib/imagefile.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/default.php b/lib/default.php index 987c9bd639..72b82e820f 100644 --- a/lib/default.php +++ b/lib/default.php @@ -211,6 +211,7 @@ $default = array('server' => null, 'dir' => INSTALLDIR . '/file/', 'path' => $_path . '/file/', + 'chmod' => 0644, // Access rights (chmod) for any attachments 'sslserver' => null, 'sslpath' => null, 'ssl' => null, @@ -256,7 +257,6 @@ $default = ), 'thumbnail' => array('crop' => false, // overridden to true if thumb height === null - 'chmod' => 0644, // Access rights (chmod) for created thumbnail images 'maxsize' => 1000, // thumbs with an edge larger than this will not be generated 'width' => 450, 'height' => 600, diff --git a/lib/imagefile.php b/lib/imagefile.php index 80cd9023cd..926617e6a2 100644 --- a/lib/imagefile.php +++ b/lib/imagefile.php @@ -255,7 +255,7 @@ class ImageFile @copy($this->filepath, $outpath); // And set chmod - @chmod($outpath, common_config('thumbnail', 'chmod'); + @chmod($outpath, common_config('attachments', 'chmod'); return $outpath; } elseif (abs($this->rotate) == 90) { // Box is rotated 90 degrees in either direction, @@ -355,7 +355,7 @@ class ImageFile } // Always chmod 0644 (default) to have other processes (e.g. queue daemon read it) - @chmod($outpath, common_config('thumbnail', 'chmod'); + @chmod($outpath, common_config('attachments', 'chmod'); imagedestroy($image_src); imagedestroy($image_dest); -- 2.39.5