[pLog-svn] r1112 - plog/trunk/class/template

oscar at devel.plogworld.net oscar at devel.plogworld.net
Thu Feb 17 06:54:48 GMT 2005


Author: oscar
Date: 2005-02-17 06:54:47 +0000 (Thu, 17 Feb 2005)
New Revision: 1112

Modified:
   plog/trunk/class/template/templateservice.class.php
Log:
changed the default permission for temporary template folders, as per issue http://bugs.plogworld.net/view.php?id=253


Modified: plog/trunk/class/template/templateservice.class.php
===================================================================
--- plog/trunk/class/template/templateservice.class.php	2005-02-16 19:34:08 UTC (rev 1111)
+++ plog/trunk/class/template/templateservice.class.php	2005-02-17 06:54:47 UTC (rev 1112)
@@ -14,6 +14,13 @@
     include_once( PLOG_CLASS_PATH.'class/file/file.class.php' );
 	include_once( PLOG_CLASS_PATH.'class/template/cachedtemplate.class.php' );
 	include_once( PLOG_CLASS_PATH.'class/template/templatesets/templatesetstorage.class.php' );
+	
+	/**
+	 * default permissions used to create temporary template folders. Seems like
+	 * Smarty creates them as 0771 but we have been adviced to create
+	 * them as 775 as per this discussion: http://bugs.plogworld.net/view.php?id=253
+	 */
+	define( 'DEFAULT_TEMPLATE_TEMP_FOLDER_PERMISSIONS', 0775 );
 
     /**
      * Generic template rendering service that takes care of providing the Template objects
@@ -102,7 +109,7 @@
 			// our rendered templates
 			if( !File::exists( $templateTmpFolder )) {
 				$this->log->debug( "creating temporary folder $templateTmpFolder" );
-				File::createDir( $templateTmpFolder );
+				File::createDir( $templateTmpFolder, DEFAULT_TEMPLATE_TEMP_FOLDER_PERMISSIONS );
 			}
 
 			$t->compile_check = $config->getValue( 'template_compile_check' );
@@ -255,7 +262,7 @@
 				$blogTmpFolder = $tmpFolder.'/'.$blogInfo->getId();
 				if( !File::exists( $blogTmpFolder )) {
 					$this->log->debug( "creating temporary folder $blogTmpFolder" );
-					File::createDir( $blogTmpFolder );
+					File::createDir( $blogTmpFolder, DEFAULT_TEMPLATE_TEMP_FOLDER_PERMISSIONS );
 				}
 			}
             $t->cache_dir    = $blogTmpFolder;




More information about the pLog-svn mailing list