mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
修复switch...case模板标签嵌套解析错误
This commit is contained in:
@@ -495,7 +495,7 @@ class Template
|
||||
foreach ($tLib->getTags() as $name => $val) {
|
||||
$tags = [$name];
|
||||
if (isset($val['alias'])) {
|
||||
// 别名设置
|
||||
// 别名设置
|
||||
$tags = explode(',', $val['alias']);
|
||||
$tags[] = $name;
|
||||
}
|
||||
@@ -659,10 +659,10 @@ class Template
|
||||
//模板函数过滤
|
||||
$fun = strtolower(trim($args[0]));
|
||||
switch ($fun) {
|
||||
case 'default': // 特殊模板函数
|
||||
case 'default': // 特殊模板函数
|
||||
$name = '(' . $name . ')?(' . $name . '):' . $args[1];
|
||||
break;
|
||||
default: // 通用模板函数
|
||||
default: // 通用模板函数
|
||||
if (!in_array($fun, $template_deny_funs)) {
|
||||
if (isset($args[1])) {
|
||||
if (strstr($args[1], '###')) {
|
||||
|
||||
@@ -33,7 +33,7 @@ class Cx extends Taglib
|
||||
'elseif' => ['attr' => 'condition', 'close' => 0],
|
||||
'else' => ['attr' => '', 'close' => 0],
|
||||
'switch' => ['attr' => 'name', 'level' => 2],
|
||||
'case' => ['attr' => 'value,break'],
|
||||
'case' => ['attr' => 'value,break', 'level' => 2],
|
||||
'default' => ['attr' => '', 'close' => 0],
|
||||
'compare' => ['attr' => 'name,value,type', 'level' => 3, 'alias' => 'eq,equal,notequal,neq,gt,lt,egt,elt,heq,nheq'],
|
||||
'range' => ['attr' => 'name,value,type', 'level' => 3, 'alias' => 'in,notin,between,notbetween'],
|
||||
|
||||
Reference in New Issue
Block a user