Skip to content

Commit ae339ca

Browse files
committed
hook更新后删除缓存
1 parent 9bfa3a1 commit ae339ca

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

wwwroot/Application/Admin/Controller/AddonsController.class.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,16 +577,20 @@ public function updateHook(){
577577
if($data){
578578
if($data['id']){
579579
$flag = $hookModel->save($data);
580-
if($flag !== false)
580+
if($flag !== false){
581+
S('hooks', null);
581582
$this->success('更新成功', Cookie('__forward__'));
582-
else
583+
}else{
583584
$this->error('更新失败');
585+
}
584586
}else{
585587
$flag = $hookModel->add($data);
586-
if($flag)
588+
if($flag){
589+
S('hooks', null);
587590
$this->success('新增成功', Cookie('__forward__'));
588-
else
591+
}else{
589592
$this->error('新增失败');
593+
}
590594
}
591595
}else{
592596
$this->error($hookModel->getError());

0 commit comments

Comments
 (0)