X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fimagefile.php;h=926617e6a26df9ff5c9dd8463e787c4725944e5a;hb=e32241ddbcb131349fbe21fa24d11a56dcdf8b0d;hp=d040a4b270309c6d41fce33c43ce2f7e91db0623;hpb=f8e7d426530e02fd10c6756668c6338a01f78a4b;p=quix0rs-gnu-social.git diff --git a/lib/imagefile.php b/lib/imagefile.php index d040a4b270..926617e6a2 100644 --- a/lib/imagefile.php +++ b/lib/imagefile.php @@ -253,6 +253,9 @@ class ImageFile if ($this->rotate == 0) { // No rotational difference, just copy it as-is @copy($this->filepath, $outpath); + + // And set chmod + @chmod($outpath, common_config('attachments', 'chmod'); return $outpath; } elseif (abs($this->rotate) == 90) { // Box is rotated 90 degrees in either direction, @@ -351,8 +354,8 @@ class ImageFile throw new Exception(_('Unknown file type')); } - // Always chmod 0644 to have other processes (e.g. queue daemon read it) - @chmod($outpath, 0644); + // Always chmod 0644 (default) to have other processes (e.g. queue daemon read it) + @chmod($outpath, common_config('attachments', 'chmod'); imagedestroy($image_src); imagedestroy($image_dest);