removed extract-calls from _include()- and _eval()-wrappers

variables passed with {include_php} have to accessed as members of $params now
This commit is contained in:
messju
2003-11-18 23:18:35 +00:00
parent 4c5506a57a
commit 209cd6efeb

View File

@@ -1994,11 +1994,8 @@ class Smarty
* wrapper for include() retaining $this * wrapper for include() retaining $this
* @return mixed * @return mixed
*/ */
function _include($filename, $once=false, $vars=null) function _include($filename, $once=false, $params=null)
{ {
if (is_array($vars))
extract($vars, EXTR_PREFIX_SAME, 'include_php_');
if ($once) { if ($once) {
return include_once($filename); return include_once($filename);
} else { } else {
@@ -2011,11 +2008,8 @@ class Smarty
* wrapper for eval() retaining $this * wrapper for eval() retaining $this
* @return mixed * @return mixed
*/ */
function _eval($code, $vars=null) function _eval($code, $params=null)
{ {
if (is_array($vars))
extract($vars, EXTR_PREFIX_SAME, 'include_php_');
return eval($code); return eval($code);
} }
/**#@-*/ /**#@-*/