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

oscar at devel.plogworld.net oscar at devel.plogworld.net
Sat Mar 5 10:36:32 GMT 2005


Author: oscar
Date: 2005-03-05 10:36:31 +0000 (Sat, 05 Mar 2005)
New Revision: 1315

Modified:
   plog/trunk/class/template/templateservice.class.php
Log:
fixed an issue with templates installed under templates/blog_X/ crashing because of some security settings.

Modified: plog/trunk/class/template/templateservice.class.php
===================================================================
--- plog/trunk/class/template/templateservice.class.php	2005-03-04 17:21:05 UTC (rev 1314)
+++ plog/trunk/class/template/templateservice.class.php	2005-03-05 10:36:31 UTC (rev 1315)
@@ -77,7 +77,7 @@
 			$t->assign( 'blogtemplate', $templateFolder.'/'.$layout );
 			
 			// change a few things...
-			$t = $this->_configureTemplateSettings( $t, $blogInfo );			
+			$t = $this->_configureTemplateSettings( $t, $blogInfo, $layout );			
 
             return $t;
         }
@@ -251,7 +251,7 @@
 		/**
 		 * @private
 		 */
-		function _configureTemplateSettings( $t, $blogInfo ) 
+		function _configureTemplateSettings( $t, $blogInfo, $layout = "" ) 
 		{
 			// change a few things...
             $config =& Config::getConfig();
@@ -264,7 +264,11 @@
 					$this->log->debug( "creating temporary folder $blogTmpFolder" );
 					File::createDir( $blogTmpFolder, DEFAULT_TEMPLATE_TEMP_FOLDER_PERMISSIONS );
 				}
+				$t->secure_dir[] = "./templates/blog_".$blogInfo->getId()."/$layout";
 			}
+			
+			$this->log->debug(" Template::secure_dir = ".$t->secure_dir);
+			
             $t->cache_dir    = $blogTmpFolder;
             $t->compile_dir  = $blogTmpFolder;
 			




More information about the pLog-svn mailing list