Merge branch 'release/zentaopms_18.3' of https://gitlab.zcorp.cc/easycorp/zentaopms into release/zentaopms_18.3
This commit is contained in:
+11
-4
@@ -446,8 +446,6 @@ class api extends control
|
||||
*/
|
||||
public function editLib($id)
|
||||
{
|
||||
$lib = $this->doc->getLibById($id);
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->doc->updateApiLib($id);
|
||||
@@ -457,9 +455,18 @@ class api extends control
|
||||
return $this->sendSuccess(array('message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "redirectParentWindow($id)"));
|
||||
}
|
||||
|
||||
$lib = $this->doc->getLibById($id);
|
||||
$type = 'nolink';
|
||||
if(!empty($lib->product)) $type = 'product';
|
||||
if(!empty($lib->project)) $type = 'project';
|
||||
if(!empty($lib->product))
|
||||
{
|
||||
$type = 'product';
|
||||
$this->view->object = $this->loadModel('product')->getByID($lib->product);
|
||||
}
|
||||
if(!empty($lib->project))
|
||||
{
|
||||
$type = 'project';
|
||||
$this->view->object = $this->loadModel('project')->getById($lib->project);
|
||||
}
|
||||
if($type != 'nolink') $this->lang->api->aclList['default'] = sprintf($this->lang->doclib->aclList['default'], $this->lang->{$type}->common);
|
||||
if($type == 'nolink') unset($this->lang->api->aclList['default']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user