mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 19:34:27 +02:00
- bugfix on template functions used with template inheritance
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
01/06/2010
|
||||||
|
- bugfix on template functions used with template inheritance
|
||||||
|
|
||||||
31/05/2010
|
31/05/2010
|
||||||
- bugfix the parser did not allow some smarty variables with special name like $for, $if, $else and others.
|
- bugfix the parser did not allow some smarty variables with special name like $for, $if, $else and others.
|
||||||
|
|
||||||
|
@@ -49,7 +49,7 @@ class Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase {
|
|||||||
$_paramsArray[] = "'$_key'=>$_value";
|
$_paramsArray[] = "'$_key'=>$_value";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset($compiler->template->properties['function'][$_name])) {
|
if (isset($compiler->template->properties['function'][$_name]['parameter'])) {
|
||||||
foreach ($compiler->template->properties['function'][$_name]['parameter'] as $_key => $_value) {
|
foreach ($compiler->template->properties['function'][$_name]['parameter'] as $_key => $_value) {
|
||||||
if (!isset($_attr[$_key])) {
|
if (!isset($_attr[$_key])) {
|
||||||
if (is_int($_key)) {
|
if (is_int($_key)) {
|
||||||
@@ -59,8 +59,8 @@ class Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif (isset($this->smarty->template->properties['function'][$_name])) {
|
} elseif (isset($this->smarty->template_functions[$_name]['parameter'])) {
|
||||||
foreach ($this->smarty->template->properties['function'][$_name]['parameter'] as $_key => $_value) {
|
foreach ($this->smarty->template_functions[$_name]['parameter'] as $_key => $_value) {
|
||||||
if (!isset($_attr[$_key])) {
|
if (!isset($_attr[$_key])) {
|
||||||
if (is_int($_key)) {
|
if (is_int($_key)) {
|
||||||
$_paramsArray[] = "$_key=>$_value";
|
$_paramsArray[] = "$_key=>$_value";
|
||||||
|
@@ -34,6 +34,9 @@ class Smarty_Internal_Compile_Function extends Smarty_Internal_CompileBase {
|
|||||||
foreach ($_attr as $_key => $_data) {
|
foreach ($_attr as $_key => $_data) {
|
||||||
$compiler->template->properties['function'][$_name]['parameter'][$_key] = $_data;
|
$compiler->template->properties['function'][$_name]['parameter'][$_key] = $_data;
|
||||||
}
|
}
|
||||||
|
if (isset($compiler->template->properties['function'][$_name]['parameter'])) {
|
||||||
|
$compiler->smarty->template_functions[$_name]['parameter'] = $compiler->template->properties['function'][$_name]['parameter'];
|
||||||
|
}
|
||||||
if ($compiler->template->caching) {
|
if ($compiler->template->caching) {
|
||||||
$output = '';
|
$output = '';
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user