* Refactor caselib::create.

This commit is contained in:
liumengyi
2023-06-19 13:57:54 +08:00
parent fff3214e29
commit 6f5ea38b67
5 changed files with 5 additions and 20 deletions
+2 -2
View File
@@ -40,8 +40,8 @@ class caselib extends control
$libID = $this->caselib->create($lib, $this->post->uid);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$response = $this->caselibZen->responseAfterCreate($libID);
return $this->send($response);
if($this->viewType == 'json') return array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $libID);
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'load' => $this->createLink('caselib', 'browse', "libID=$libID")));
}
$this->caselibZen->setCreateMenu();