Skip to content

Commit

Permalink
v8.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
simplewindorg committed Sep 17, 2023
1 parent 88e2cc3 commit 36e2812
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ ThinkCMF核心API扩展
===============

## 更新日志
### v8.0.2
* 修复模板管理验证问题

### v8.0.1
* 完善后台API

Expand Down
20 changes: 15 additions & 5 deletions src/admin/controller/ThemeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,9 @@ public function fileSettingPost()
}
}

$validate = new Validate($rules, $messages);
$validate = new Validate();
$validate->rule($rules);
$validate->message($messages);
$result = $validate->check($post['vars']);
if (!$result) {
$this->error($validate->getError());
Expand Down Expand Up @@ -558,7 +560,9 @@ public function fileSettingPost()
}

if ($widget['display']) {
$validate = new Validate($rules, $messages);
$validate = new Validate();
$validate->rule($rules);
$validate->message($messages);
$widgetVars = empty($post['widget_vars'][$mWidgetName]) ? [] : $post['widget_vars'][$mWidgetName];
$result = $validate->check($widgetVars);
if (!$result) {
Expand Down Expand Up @@ -1223,7 +1227,9 @@ public function fileArrayDataEditPost()
}
}

$validate = new Validate($rules, $messages);
$validate = new Validate();
$validate->rule($rules);
$validate->message($messages);
$result = $validate->check($post['item']);
if (!$result) {
$this->error($validate->getError());
Expand Down Expand Up @@ -1266,7 +1272,9 @@ public function fileArrayDataEditPost()
}
}

$validate = new Validate($rules, $messages);
$validate = new Validate();
$validate->rule($rules);
$validate->message($messages);
$result = $validate->check($post['item']);
if (!$result) {
$this->error($validate->getError());
Expand Down Expand Up @@ -1311,7 +1319,9 @@ public function fileArrayDataEditPost()
}
}

$validate = new Validate($rules, $messages);
$validate = new Validate();
$validate->rule($rules);
$validate->message($messages);
$result = $validate->check($post['item']);
if (!$result) {
$this->error($validate->getError());
Expand Down

0 comments on commit 36e2812

Please sign in to comment.