Merge branch 'master' of https://gitee.com/karson/fastadmin
正在显示
3 个修改的文件
包含
5 行增加
和
4 行删除
@@ -137,7 +137,7 @@ | @@ -137,7 +137,7 @@ | ||
137 | <label for="row[{$item.name}]-no"><input id="row[{$item.name}]-no" name="row[{$item.name}]" type="radio" value="0" {$item.value?'':'checked'} data-tip="{$item.tip}" /> {:__('No')}</label> | 137 | <label for="row[{$item.name}]-no"><input id="row[{$item.name}]-no" name="row[{$item.name}]" type="radio" value="0" {$item.value?'':'checked'} data-tip="{$item.tip}" /> {:__('No')}</label> |
138 | {/case} | 138 | {/case} |
139 | {case custom} | 139 | {case custom} |
140 | - {$item.extend} | 140 | + {$item.extend_html} |
141 | {/case} | 141 | {/case} |
142 | {/switch} | 142 | {/switch} |
143 | </div> | 143 | </div> |
@@ -108,7 +108,7 @@ class Token | @@ -108,7 +108,7 @@ class Token | ||
108 | */ | 108 | */ |
109 | public static function get($token, $default = false) | 109 | public static function get($token, $default = false) |
110 | { | 110 | { |
111 | - return self::init()->get($token, $default); | 111 | + return self::init()->get($token) ?: $default; |
112 | } | 112 | } |
113 | 113 | ||
114 | /** | 114 | /** |
@@ -148,7 +148,7 @@ class Token | @@ -148,7 +148,7 @@ class Token | ||
148 | /** | 148 | /** |
149 | * 清除Token | 149 | * 清除Token |
150 | * @access public | 150 | * @access public |
151 | - * @param string $token Token标记 | 151 | + * @param int user_id 用户编号 |
152 | * @return boolean | 152 | * @return boolean |
153 | */ | 153 | */ |
154 | public static function clear($user_id = null) | 154 | public static function clear($user_id = null) |
@@ -19,6 +19,7 @@ class Config extends Model | @@ -19,6 +19,7 @@ class Config extends Model | ||
19 | protected $updateTime = false; | 19 | protected $updateTime = false; |
20 | // 追加属性 | 20 | // 追加属性 |
21 | protected $append = [ | 21 | protected $append = [ |
22 | + 'extend_html' | ||
22 | ]; | 23 | ]; |
23 | 24 | ||
24 | /** | 25 | /** |
@@ -72,7 +73,7 @@ class Config extends Model | @@ -72,7 +73,7 @@ class Config extends Model | ||
72 | return $regexList; | 73 | return $regexList; |
73 | } | 74 | } |
74 | 75 | ||
75 | - public function getExtendAttr($value, $data) | 76 | + public function getExtendHtmlAttr($value, $data) |
76 | { | 77 | { |
77 | $result = preg_replace_callback("/\{([a-zA-Z]+)\}/", function ($matches) use ($data) { | 78 | $result = preg_replace_callback("/\{([a-zA-Z]+)\}/", function ($matches) use ($data) { |
78 | if (isset($data[$matches[1]])) { | 79 | if (isset($data[$matches[1]])) { |
-
请 注册 或 登录 后发表评论