Re: Caching: $params['name'] missed
| From: | Thomas Schulz | Date: | Sun, 16 Feb 2003 22:05:25 +0000 |
| Subject: | Re: Caching: $params['name'] missed | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-707@lists.php.net to get a copy of this message | ||
Thomas Schulz schrieb in php.smarty.dev:
> today I discover that in (insert)-plugins the $params-array also
> contains the name of the plugin. This is very useful in my environment
> to autogenerate especially template names.
>
> But the trouble is, that $params['name'] is no longer defined when I
> enable caching.
Here is the very simple patch in _process_cached_inserts() to make
$params['name'] also available, when an insert plugin is called from
cached output ;-)
Would be nice to see this in next version, if there are no other
dependencies.
cvs -q diff -u
Index: smarty/Smarty.class.php
===================================================================
RCS file: /repository/smarty/Smarty.class.php,v
retrieving revision 1.345
diff -u -r1.345 Smarty.class.php
--- smarty/Smarty.class.php 16 Feb 2003 05:09:19 -0000 1.345
+++ smarty/Smarty.class.php 16 Feb 2003 21:52:31 -0000
@@ -1808,7 +1808,6 @@
$args = unserialize($insert_args[$i]);
$name = $args['name'];
- unset($args['name']);
if (isset($args['script'])) {
if
(!$this->_get_php_resource($this->_dequote($args
['script']), $resource_type, $php_resource)) {
--
http://4bconsult.de