[pLog-svn] r1126 - plog/trunk/class/view
mark at devel.plogworld.net
mark at devel.plogworld.net
Fri Feb 18 12:29:50 GMT 2005
Author: mark
Date: 2005-02-18 12:29:50 +0000 (Fri, 18 Feb 2005)
New Revision: 1126
Modified:
plog/trunk/class/view/plugintemplatedview.class.php
Log:
PluginTemplatedView should check the smarty cache enable or not, and also need to take the parameter into accoount. Or it is impossible to disable smarty cache in pluginTemplatedView.
Modified: plog/trunk/class/view/plugintemplatedview.class.php
===================================================================
--- plog/trunk/class/view/plugintemplatedview.class.php 2005-02-18 09:37:47 UTC (rev 1125)
+++ plog/trunk/class/view/plugintemplatedview.class.php 2005-02-18 12:29:50 UTC (rev 1126)
@@ -30,13 +30,23 @@
*/
function PluginTemplatedView( $blogInfo, $pluginId, $templateName, $cachingEnabled = SMARTY_VIEW_CACHE_CHECK, $data = Array())
{
+ if( $cachingEnabled == SMARTY_VIEW_CACHE_CHECK ) {
+ // detect whether caching should be enabled or not
+ $config =& Config::getConfig();
+ $cachingEnabled = $config->getValue( "template_cache_enabled" );
+ }
+
$this->BlogView( $blogInfo, "" );
$this->_templateService = new TemplateService();
$this->_templateName = $templateName;
$this->_pluginId = $pluginId;
- $this->_template = $this->_templateService->PluginCachedTemplate( $this->_pluginId, $this->_templateName );
+ if ($cachingEnabled == SMARTY_VIEW_CACHE_DISABLED) {
+ $this->_template = $this->_templateService->PluginTemplate( $this->_pluginId, $this->_templateName );
+ } else {
+ $this->_template = $this->_templateService->PluginCachedTemplate( $this->_pluginId, $this->_templateName );
+ }
}
/**
More information about the pLog-svn
mailing list