切换导航条
此项目
正在载入...
登录
何书鹏
/
recruit
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
Karson
5 years ago
提交者
Gitee
5 years ago
提交
df183a86e4fd635e017c0591b1595e2faba2ea07
2 个父辈
bcd1b7fb
ac7f3f26
!214 解决Config系统配置自定义类型字段定界符被修改后保存到数据库导致编辑后无法正常替换定界符得问题
Merge pull request !214 from Twhmr/master
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
5 行增加
和
4 行删除
application/admin/view/general/config/index.html
application/common/library/Token.php
application/common/model/Config.php
application/admin/view/general/config/index.html
查看文件 @
df183a8
...
...
@@ -137,7 +137,7 @@
<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>
{/case}
{case custom}
{$item.extend}
{$item.extend
_html
}
{/case}
{/switch}
</div>
...
...
application/common/library/Token.php
查看文件 @
df183a8
...
...
@@ -108,7 +108,7 @@ class Token
*/
public
static
function
get
(
$token
,
$default
=
false
)
{
return
self
::
init
()
->
get
(
$token
,
$default
)
;
return
self
::
init
()
->
get
(
$token
)
?:
$default
;
}
/**
...
...
@@ -148,7 +148,7 @@ class Token
/**
* 清除Token
* @access public
* @param
string $token Token标记
* @param
int user_id 用户编号
* @return boolean
*/
public
static
function
clear
(
$user_id
=
null
)
...
...
application/common/model/Config.php
查看文件 @
df183a8
...
...
@@ -19,6 +19,7 @@ class Config extends Model
protected
$updateTime
=
false
;
// 追加属性
protected
$append
=
[
'extend_html'
];
/**
...
...
@@ -72,7 +73,7 @@ class Config extends Model
return
$regexList
;
}
public
function
getExtendAttr
(
$value
,
$data
)
public
function
getExtend
Html
Attr
(
$value
,
$data
)
{
$result
=
preg_replace_callback
(
"/\{([a-zA-Z]+)\}/"
,
function
(
$matches
)
use
(
$data
)
{
if
(
isset
(
$data
[
$matches
[
1
]]))
{
...
...
请
注册
或
登录
后发表评论