From b1525965248ca997aab6855d9fa8dffaca7bf99d Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Mon, 28 Oct 2024 15:52:07 +0800 Subject: [PATCH] *[misc] use getobjectbylib. --- module/doc/control.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index dbf630d212..a3077ab980 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -781,14 +781,7 @@ class doc extends control if($this->app->tab == 'doc' && !empty($lib) && $lib->type == 'execution') $appendLib = $doc->lib; $objectType = $lib->type; - if(in_array($lib->type, array('product', 'project', 'execution'))) - { - $objectID = zget($doc, $objectType, 0); - } - else - { - $objectID = $lib->parent; - } + $objectID = $this->doc->getObjectIDByLib($lib, $objectType); /* Get doc. */ if($docID) $this->doc->createAction($docID, 'view');