* [bug#57711] fix acion for system.

This commit is contained in:
liyang
2024-12-09 09:21:27 +08:00
committed by 刘刚
parent 796f3c8ac6
commit bc214dfdd4
2 changed files with 13 additions and 10 deletions
+2 -7
View File
@@ -623,9 +623,6 @@ class system extends control
->setDefault('editedBy', $this->app->user->account)
->get();
$change = common::createChanges($system, $formData);
if(empty($change)) return $this->sendSuccess(array('load' => true));
$this->system->update($id, $formData);
if(dao::isError()) return $this->sendError(dao::getError());
@@ -651,10 +648,9 @@ class system extends control
$system = new stdclass();
$system->status = 'active';
$this->system->update($id, $system, false);
$this->system->update($id, $system, 'active');
if(dao::isError()) return $this->sendError(dao::getError());
$this->loadModel('action')->create('system', $id, 'active');
$this->sendSuccess(array('load' => true));
}
@@ -671,10 +667,9 @@ class system extends control
$system = new stdclass();
$system->status = 'inactive';
$this->system->update($id, $system, false);
$this->system->update($id, $system, 'inactive');
if(dao::isError()) return $this->sendError(dao::getError());
$this->loadModel('action')->create('system', $id, 'inactive');
$this->sendSuccess(array('load' => true));
}