mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
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:
@@ -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);
|
||||||
}
|
}
|
||||||
/**#@-*/
|
/**#@-*/
|
||||||
|
Reference in New Issue
Block a user