mirror of https://gitee.com/karson/fastadmin.git
update application/common/model/Config.php.
新增额外属性 extend_html,用来解决直接替换extend的预定义定界符被篡改并保存进数据库的问题的问题pull/214/head
parent
bcd1b7fb9c
commit
5e908498bd
|
|
@ -19,6 +19,7 @@ class Config extends Model
|
||||||
protected $updateTime = false;
|
protected $updateTime = false;
|
||||||
// 追加属性
|
// 追加属性
|
||||||
protected $append = [
|
protected $append = [
|
||||||
|
'extend_html'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -72,7 +73,7 @@ class Config extends Model
|
||||||
return $regexList;
|
return $regexList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getExtendAttr($value, $data)
|
public function getExtendHtmlAttr($value, $data)
|
||||||
{
|
{
|
||||||
$result = preg_replace_callback("/\{([a-zA-Z]+)\}/", function ($matches) use ($data) {
|
$result = preg_replace_callback("/\{([a-zA-Z]+)\}/", function ($matches) use ($data) {
|
||||||
if (isset($data[$matches[1]])) {
|
if (isset($data[$matches[1]])) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue