splittingred / phpThumbOf

A secure phpthumb output filter for MODx Revolution
http://rtfm.modx.com/display/addon/phpthumbof/
23 stars 17 forks source link

respecting the new-file-permission setting #7

Closed bertoost closed 13 years ago

bertoost commented 13 years ago

In some server configurations (like apache with suphp) it's important that the permissions are right! To make your snippet better it would be great if the system new-file-permission settings are respected.

In order to get the images viewed with suphp the files needs to be 644 and the directories 755. This settings are made in the system settings, please apply them when creating the cache

bertoost commented 13 years ago

Simpel fix around line 135 of the phpthumb snippet

$filePerm = (integer) $modx->getOption('new_file_permissions');
chmod($cacheKey, octdec($filePerm));

This fixes the issue for the image files