Re: Bug in Smarty::clear_cache()
| From: | Monte Ohrt | Date: | Mon, 12 Nov 2001 15:11:20 +0000 |
| Subject: | Re: Bug in Smarty::clear_cache() | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1907@lists.php.net to get a copy of this message | ||
Change that line to:
function clear_cache($tpl_file = null, $cache_id = null, $compile_id
= null)
The third parameter should be set to null by default, not demanded.
I'm working on abstracting the cache functionality so you can have your
own cache handler in Smarty, so I'm not going to commit the next
snapshot yet since it is not quite ready.
Monte
Thomas Pundt wrote:
>
> Hi all,
>
> Smarty-1.4.6 (and newer snapshot) seems to have introduced
> a bug in programatically removing a cache dir.
>
> In one of my files I use
>
> $tpl->clear_cache($cachefiles);
>
> This now demands a third parameter; setting the prototype
> to
>
> Smarty::clear_cache($tpl_file = null, $cache_id = null,
> $compile_id = null)
>
> doesn't remove the cache dir because in Smarty::_rm_auto()
> $auto_id then always is set.
>
> I've fixed this in _rm_auto() by checking strlen($auto_id),
> but this might not be the correct approach...
>
> Ciao,
> Thomas
>
> --
> Thomas Pundt -------------------------- http://rp-online.de/
> -----------------
> RP-Online Verlagsgesellschaft mbH | pundt@rp-online.de
> Blumenstrasse 28, D-40212 Duesseldorf | Schlossstrasse 42, D-40477 Duesseldorf
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/