[pLog-svn] r5445 - plog/branches/lifetype-1.2/class/template

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Thu May 24 23:22:02 EDT 2007


Author: jondaley
Date: 2007-05-24 23:22:01 -0400 (Thu, 24 May 2007)
New Revision: 5445

Modified:
   plog/branches/lifetype-1.2/class/template/cachedtemplate.class.php
Log:
reverted 5442, it causes a crash.  I didn't investigate, but presumably when the template is cached can't find the _smarty_nocache function - I had tested it before, and it looked alright, so I am not sure why I suddenly got this crash.  It was on a page that used a {dynamic} tag and a {php} tag, if that has anything to do with it.

Modified: plog/branches/lifetype-1.2/class/template/cachedtemplate.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/template/cachedtemplate.class.php	2007-05-24 18:16:31 UTC (rev 5444)
+++ plog/branches/lifetype-1.2/class/template/cachedtemplate.class.php	2007-05-25 03:22:01 UTC (rev 5445)
@@ -31,6 +31,11 @@
             $config =& Config::getConfig();			
             $this->caching = $config->getValue( "template_cache_enabled");
             $this->cache_lifetime =  $config->getValue( "template_cache_lifetime" );
+            //$this->cache_dir    = $config->getValue( "temp_folder" )
+
+			// whatever is between the {dynamic}...{/dynamic} tags shouldn't be cached
+			$this->register_block('dynamic', "_smarty_nocache", false);
+			
         }
 
         /**
@@ -96,4 +101,14 @@
 			return $timestamp;
 		}
     }
+	
+	
+	/**
+	 * @private
+	 * this tells smarty *not* to cache contents, in case we need it
+	 */
+	function _smarty_nocache($param, $content, $smarty ) 
+	{
+		return $content;
+	}
 ?>



More information about the pLog-svn mailing list