mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 07:32:48 +08:00
修正模板引擎的函数解析
This commit is contained in:
@@ -742,7 +742,7 @@ class Template
|
|||||||
$fun = trim($args[0]);
|
$fun = trim($args[0]);
|
||||||
switch ($fun) {
|
switch ($fun) {
|
||||||
case 'default': // 特殊模板函数
|
case 'default': // 特殊模板函数
|
||||||
$varStr = '(isset(' . $name . ') && (' . $name . ' !== \'\'))?(' . $name . '):' . $args[1];
|
$name = '(isset(' . $name . ') && (' . $name . ' !== \'\'))?(' . $name . '):' . $args[1];
|
||||||
break;
|
break;
|
||||||
default: // 通用模板函数
|
default: // 通用模板函数
|
||||||
if (!in_array($fun, $template_deny_funs)) {
|
if (!in_array($fun, $template_deny_funs)) {
|
||||||
@@ -751,7 +751,7 @@ class Template
|
|||||||
$args[1] = str_replace('###', $name, $args[1]);
|
$args[1] = str_replace('###', $name, $args[1]);
|
||||||
$name = "$fun($args[1])";
|
$name = "$fun($args[1])";
|
||||||
} else {
|
} else {
|
||||||
$varStr = "$fun($name,$args[1])";
|
$name = "$fun($name,$args[1])";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!empty($args[0])) {
|
if (!empty($args[0])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user