*[misc] use getobjectbylib.

This commit is contained in:
songchenxuan
2024-10-29 09:45:50 +08:00
committed by 朱金勇
parent 04564f9d67
commit 5f78a51da1
+1 -8
View File
@@ -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');