From: Roland Haeder Date: Mon, 23 Feb 2015 20:21:53 +0000 (+0100) Subject: Changed thumbnail-only chmod to attachment-general chmod as recommended by mmn. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e32241ddbcb131349fbe21fa24d11a56dcdf8b0d;p=quix0rs-gnu-social.git Changed thumbnail-only chmod to attachment-general chmod as recommended by mmn. Signed-off-by: Roland Haeder --- 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);