*[misc] use getobjectbylib.

This commit is contained in:
songchenxuan
2024-10-28 15:53:47 +08:00
committed by 綦新志
parent bd7981c97c
commit b152596524
+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');