cvs: smarty /libs Smarty_Compiler.class.php
"Messju Mohr" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmessju1060157790@cvsserver> |
messju Wed Aug 6 04:16:30 2003 EDT
Modified files:
/smarty/libs Smarty_Compiler.class.php
Log:
fixed bug with autoload-handling of modifiers. thanks ándre.
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.269 smarty/libs/Smarty_Compiler.class.php:1.270
--- smarty/libs/Smarty_Compiler.class.php:1.269 Tue Aug 5 18:48:05 2003
+++ smarty/libs/Smarty_Compiler.class.php Wed Aug 6 04:16:29 2003
@@ -39,7 +39,7 @@
* @package Smarty
*/
-/* $Id: Smarty_Compiler.class.php,v 1.269 2003/08/05 22:48:05 messju Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.270 2003/08/06 08:16:29 messju Exp $ */
/**
* Template compiling class
@@ -1773,23 +1773,16 @@
$_map_array = true;
}
- if (isset($this->_plugins['modifier'][$_modifier_name])
- || (isset($this->_plugin_info['modifier']) && isset($this->_plugin_info['modifier'][$_modifier_name]))) {
- /* modifier is already known */
- } elseif ($this->_get_plugin_filepath('modifier', $_modifier_name)) {
- $this->_add_plugin('modifier', $_modifier_name);
- } elseif (function_exists($_modifier_name)) {
+ $this->_add_plugin('modifier', $_modifier_name);
+ if (empty($this->_plugins['modifier'][$_modifier_name])
+ && !$this->_get_plugin_filepath('modifier', $_modifier_name)
+ && function_exists($_modifier_name)) {
if ($this->security && !in_array($_modifier_name, $this->security_settings['MODIFIER_FUNCS'])) {
$this->_trigger_fatal_error("[plugin] (secure mode) modifier '$_modifier_name' is not allowed" , $_tpl_file, $_tpl_line, __FILE__, __LINE__);
} else {
$this->_plugins['modifier'][$_modifier_name] = array($_modifier_name, null, null, false);
}
- } else {
- /* modifier not found */
- $this->_syntax_error("[plugin] modifier '$_modifier_name' not found", E_USER_ERROR, __FILE__, __LINE__);
- return;
}
-
$this->_parse_vars_props($_modifier_args);
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php