[pLog-svn] r4565 - plog/trunk/class/gallery/resizers
Jon Daley
plogworld at jon.limedaley.com
Fri Jan 19 14:12:55 GMT 2007
I have been playing around with Joomla, and one of the
configuration options they have is an optional chmod setting for files
(and a separate one for directories). That is pretty handy - to replace
all the hardcoded chmods we have in our code - and then people can choose
the values they want, since there are different requirements for different
hosts.
On Fri, 19 Jan 2007, oscar at devel.lifetype.net wrote:
> Author: oscar
> Date: 2007-01-19 13:16:54 +0000 (Fri, 19 Jan 2007)
> New Revision: 4565
>
> Modified:
> plog/trunk/class/gallery/resizers/galleryimagemagickresizer.class.php
> Log:
> I needed to reset the file attributes after being generated in my hosting, I guess because of the system-wide umask settings,
> otherwise they'd end up as 0600 and unreadable by the web server
>
>
> Modified: plog/trunk/class/gallery/resizers/galleryimagemagickresizer.class.php
> ===================================================================
> --- plog/trunk/class/gallery/resizers/galleryimagemagickresizer.class.php 2007-01-19 13:02:39 UTC (rev 4564)
> +++ plog/trunk/class/gallery/resizers/galleryimagemagickresizer.class.php 2007-01-19 13:16:54 UTC (rev 4565)
> @@ -40,6 +40,11 @@
> // check if there was an error creating the thubmnail
> if($cmdOutput === FALSE || $retval )
> return false;
> +
> + // depending on the default file creation settings in some hosts, files created via
> + // ImageMagick may not be readable by the web server
> + File::chMod( $outFile, 0644 );
> +
> return $outFile;
> }
> }
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>
--
Jon Daley
http://jon.limedaley.com/
The ultimate measure of a man is not where he stands in
moments of comfort, but where he stands at times of challenge.
-- Martin Luther King, Jr.
More information about the pLog-svn
mailing list