Changed thumbnail-only chmod to attachment-general chmod as recommended by mmn.
authorRoland Haeder <roland@mxchange.org>
Mon, 23 Feb 2015 20:21:53 +0000 (21:21 +0100)
committerRoland Haeder <roland@mxchange.org>
Mon, 23 Feb 2015 20:21:53 +0000 (21:21 +0100)
Signed-off-by: Roland Haeder <roland@mxchange.org>
lib/default.php
lib/imagefile.php

index 987c9bd6395fd7d9d1b9ba50ec2eca4a7f35cb5f..72b82e820fa3026a39feae26da52529d513f6e66 100644 (file)
@@ -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,
index 80cd9023cd8f2bbbf8a821630ee5f001fc9c3c97..926617e6a26df9ff5c9dd8463e787c4725944e5a 100644 (file)
@@ -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);