),
'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,
if ($this->rotate == 0) {
// No rotational difference, just copy it as-is
@copy($this->filepath, $outpath);
+
+ // And set chmod
+ @chmod($outpath, common_config('thumbnail', 'chmod');
return $outpath;
} elseif (abs($this->rotate) == 90) {
// Box is rotated 90 degrees in either direction,
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('thumbnail', 'chmod');
imagedestroy($image_src);
imagedestroy($image_dest);