[pLog-svn] r6553 - plugins/branches/lifetype-1.2/templateeditor/class/file

Reto Hugi plog at hugi.to
Sun Jun 15 16:47:05 EDT 2008


Looks like a clever change to me. not tested, though.


jondaley at devel.lifetype.net wrote:
> Author: jondaley
> Date: 2008-06-14 18:31:31 -0400 (Sat, 14 Jun 2008)
> New Revision: 6553
> 
> Modified:
>    plugins/branches/lifetype-1.2/templateeditor/class/file/myfile.class.php
> Log:
> Does this change hurt anyone?  It makes the template editor work on hosts running php as a cgi or suphp.  I originally thought it would be harder to fix to make it work for everyone, but I think this is alright?
> 
> Modified: plugins/branches/lifetype-1.2/templateeditor/class/file/myfile.class.php
> ===================================================================
> --- plugins/branches/lifetype-1.2/templateeditor/class/file/myfile.class.php	2008-06-14 22:17:12 UTC (rev 6552)
> +++ plugins/branches/lifetype-1.2/templateeditor/class/file/myfile.class.php	2008-06-14 22:31:31 UTC (rev 6553)
> @@ -43,12 +43,15 @@
>               
>               // Simple copy for a file
>               if (is_file($source)) {
> -                 return File::copy($source, $dest);
> +                 $success = File::copy($source, $dest);
> +                 if($success)
> +                     File::chMod($dest, 0644);
> +                 return $success;
>               }
>            
>               // Make destination directory
>               if (!File::isDir($dest)) {
> -                 File::createDir($dest);
> +                 File::createDir($dest, 0755);
>               }
>            
>               // Loop through the folder
> 
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn



More information about the pLog-svn mailing list