mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
- enhancement allow access to properties of registered opjects for Smarty2 BC (forum topic 24344)
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== trunk =====
|
===== trunk =====
|
||||||
|
27.07.2013
|
||||||
|
- enhancement allow access to properties of registered opjects for Smarty2 BC (forum topic 24344)
|
||||||
|
|
||||||
26.07.2013
|
26.07.2013
|
||||||
- bugfix template inheritance nesting problem (forum topic 24387)
|
- bugfix template inheritance nesting problem (forum topic 24387)
|
||||||
|
|
||||||
|
@@ -48,6 +48,8 @@ class Smarty_Internal_Compile_Private_Object_Function extends Smarty_Internal_Co
|
|||||||
$_assign = $_attr['assign'];
|
$_assign = $_attr['assign'];
|
||||||
unset($_attr['assign']);
|
unset($_attr['assign']);
|
||||||
}
|
}
|
||||||
|
// method or property ?
|
||||||
|
if (method_exists($compiler->smarty->registered_objects[$tag][0], $method)) {
|
||||||
// convert attributes into parameter array string
|
// convert attributes into parameter array string
|
||||||
if ($compiler->smarty->registered_objects[$tag][2]) {
|
if ($compiler->smarty->registered_objects[$tag][2]) {
|
||||||
$_paramsArray = array();
|
$_paramsArray = array();
|
||||||
@@ -64,6 +66,11 @@ class Smarty_Internal_Compile_Private_Object_Function extends Smarty_Internal_Co
|
|||||||
$_params = implode(",", $_attr);
|
$_params = implode(",", $_attr);
|
||||||
$return = "\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$method}({$_params})";
|
$return = "\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$method}({$_params})";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// object property
|
||||||
|
$return = "\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$method}";
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($_assign)) {
|
if (empty($_assign)) {
|
||||||
// This tag does create output
|
// This tag does create output
|
||||||
$compiler->has_output = true;
|
$compiler->has_output = true;
|
||||||
|
Reference in New Issue
Block a user