mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-08 00:01:38 +01:00
update plugins to return values instead of echo, fix config file cache
to include global config variables in cache file
This commit is contained in:
@@ -22,13 +22,15 @@ function smarty_function_eval($params, &$this)
|
||||
|
||||
$this->_compile_template("evaluated template", $var, $source);
|
||||
|
||||
ob_start();
|
||||
eval('?>' . $source);
|
||||
$contents = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
if (!empty($assign)) {
|
||||
ob_start();
|
||||
eval('?>' . $source);
|
||||
$this->assign($assign, ob_get_contents());
|
||||
ob_end_clean();
|
||||
$this->assign($assign, $contents);
|
||||
} else {
|
||||
eval('?>' . $source);
|
||||
return $contents;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user