From c963a8342e8ba8693c8a5d61d496cfb56045d1c6 Mon Sep 17 00:00:00 2001 From: "monte.ohrt" Date: Tue, 8 Jun 2010 20:45:18 +0000 Subject: [PATCH] fix assign_by_ref and append_by_ref BC compatability --- libs/sysplugins/smarty_internal_data.php | 28 ++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/libs/sysplugins/smarty_internal_data.php b/libs/sysplugins/smarty_internal_data.php index 6813ad6c..ec7d0d4f 100644 --- a/libs/sysplugins/smarty_internal_data.php +++ b/libs/sysplugins/smarty_internal_data.php @@ -68,6 +68,19 @@ class Smarty_Internal_Data { } } /** + * wrapper function for Smarty 2 BC + * + * @param string $tpl_var the template variable name + * @param mixed $ &$value the referenced value to assign + * @param boolean $nocache if true any output of this variable will be not cached + * @param boolean $scope the scope the variable will have (local,parent or root) + */ + public function assign_by_ref($tpl_var, &$value, $nocache = false, $scope = SMARTY_LOCAL_SCOPE) + { + trigger_error("function call 'assign_by_ref' is unknown or deprecated, use 'assignByRef'",E_USER_NOTICE); + $this->assignByRef($tpl_var,$value,$nocache,$scope); + } + /** * appends values to template variables * * @param array $ |string $tpl_var the template variable name(s) @@ -157,7 +170,18 @@ class Smarty_Internal_Data { } } } - + /** + * wrapper function for Smarty 2 BC + * + * @param string $tpl_var the template variable name + * @param mixed $ &$value the referenced value to append + * @param boolean $merge flag if array elements shall be merged + */ + public function append_by_ref($tpl_var, &$value, $merge = false) + { + trigger_error("function call 'append_by_ref' is unknown or deprecated, use 'appendByRef'",E_USER_NOTICE); + $this->appendByRef($tpl_var,$value,$merge); + } /** * Returns a single or all template variables * @@ -440,4 +464,4 @@ class Undefined_Smarty_Variable { } } -?> \ No newline at end of file +?>