[pLog-svn] r1126 - plog/trunk/class/view

Oscar Renalias oscar at renalias.net
Fri Feb 18 18:50:16 GMT 2005


Just one quick comment: so far I've been the "keeper" of the core 
classes but it's ok that people are finally getting involved. One step 
closer to being a truly open project! :-)

However, I'd like to ask you one thing when you make this kind of 
changes: make sure you test them well and that you are aware of all the 
implications that a change in certain classes mean, as it could 
potentially create mysterious bugs later on and nobody will know why. 
Other than that, keep them coming :-)

Oscar

On 18 Feb 2005, at 14:29, mark at devel.plogworld.net wrote:

> 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 );	
> +        	}
>          }
>
>          /**
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-svn
>




More information about the pLog-svn mailing list