* fix for set object link.

This commit is contained in:
王怡栋
2021-09-01 11:30:47 +08:00
parent 35934fa6d9
commit cdb85dcf8b
2 changed files with 20 additions and 2 deletions
+19 -1
View File
@@ -1156,7 +1156,25 @@ class actionModel extends model
}
else
{
$action->objectLink = helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectID));
if($action->objectType == 'doclib')
{
$libID = $action->objectID;
$type = 'custom';
if($action->execution != 0) $type = 'execution';
if($action->project != 0) $type = 'project';
if($action->product != ',0,') $type = 'product';
$libObjectID = $type != 'custom' ? $action->$type : '';
$libObjectID = trim($libObjectID, ',');
if(empty($libObjectID)) return false;
$params = sprintf($vars, $type, $libObjectID, $libID);
}
else
{
$params = sprintf($vars, $action->objectID);
}
$action->objectLink = helper::createLink($moduleName, $methodName, $params);
if($action->objectType == 'doclib')
{