Merge branch 'sprint/fixbug_hufangzhou_doclibaction' into 'master'

* Fix the bug of doc lib related actions don't show.

See merge request easycorp/zentaopms!2755
This commit is contained in:
王怡栋
2022-04-07 08:21:03 +00:00
3 changed files with 13 additions and 8 deletions
+4 -4
View File
@@ -1072,7 +1072,7 @@ class actionModel extends model
/* Add name field to the actions. */
$action->objectName = isset($objectNames[$action->objectType][$action->objectID]) ? $objectNames[$action->objectType][$action->objectID] : '';
if($action->objectType =='program' and strpos('syncexecution,syncproject,syncprogram', $action->action) !==false)
if($action->objectType == 'program' and strpos('syncexecution,syncproject,syncprogram', $action->action) !== false)
{
$action->objectName .= $this->lang->action->label->startProgram;
}
@@ -1319,9 +1319,9 @@ class actionModel extends model
{
$libID = $action->objectID;
$type = 'custom';
if($action->execution != 0) $type = 'execution';
if($action->project != 0) $type = 'project';
if($action->product != ',0,') $type = 'product';
if(!empty($action->project)) $type = 'project';
if(!empty($action->execution)) $type = 'execution';
if(!empty($action->product)) $type = 'product';
$libObjectID = $type != 'custom' ? $action->$type : '';
$libObjectID = trim($libObjectID, ',');
+6 -3
View File
@@ -340,7 +340,7 @@ class api extends control
/**
* Edit an api doc library
*
* @param $id
* @param int $id
* @access public
* @return void
*/
@@ -374,9 +374,12 @@ class api extends control
/**
* Delete api library.
*
* @param int $libID
* @param string $confirm
* @param string $from
* @access public
* @return void
*/
public function deleteLib($libID, $confirm = 'no')
{
@@ -400,7 +403,7 @@ class api extends control
/**
* Edit library.
*
* @param int $apiID
* @param int $apiID
* @access public
* @return void
*/
+3 -1
View File
@@ -1046,6 +1046,8 @@ class doc extends control
}
}
$doc = $docID ? $doc : '';
$this->view->customObjectLibs = $customObjectLibs;
$this->view->showLibs = $this->config->doc->custom->objectLibs;
@@ -1053,7 +1055,7 @@ class doc extends control
$this->view->position[] = ($type == 'book' or $type == 'custom') ? $this->lang->doc->customAB : $object->name;
$this->view->docID = $docID;
$this->view->doc = $docID ? $doc : '';
$this->view->doc = $doc;
$this->view->type = $type;
$this->view->version = $version;
$this->view->object = $object;