!263 修改 后台-》常规配置-》管理配置-》系统配置 的 初始化方法

Merge pull request !263 from 小鸡炖蘑菇/master
pull/263/MERGE
Karson 2020-12-19 10:51:10 +08:00 committed by Gitee
commit c4d676aa8c
1 changed files with 2 additions and 1 deletions

View File

@ -28,7 +28,8 @@ class Config extends Backend
public function _initialize()
{
parent::_initialize();
$this->model = model('Config');
// $this->model = model('Config');
$this->model = new ConfigModel;
ConfigModel::event('before_write', function ($row) {
if (isset($row['name']) && $row['name'] == 'name' && preg_match("/fast" . "admin/i", $row['value'])) {
throw new Exception(__("Site name incorrect"));