From 19ca95819b17ee2810219eaec5aefbcafd734471 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 5 Aug 2021 10:48:16 +0800 Subject: [PATCH] * fix bug #14059. --- module/doc/model.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/module/doc/model.php b/module/doc/model.php index 9ec28509f3..4e007839e1 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1791,12 +1791,11 @@ class docModel extends model foreach($docs as $doc) { $objectID = 0; - if($doc->type == 'product') $objectID = $doc->product; - if($doc->type == 'project' or $doc->type == 'execution') $objectID = $doc->project; + if($doc->type == 'product') $objectID = $doc->product; + if($doc->type == 'project') $objectID = $doc->project; + if($doc->type == 'execution') $objectID = $doc->execution; - $docType = ($doc->type == 'execution') ? 'project' : $doc->type; - - $html .= '
  • ' . html::a(inlink('objectLibs', "type={$docType}&objectID=$objectID&libID={$doc->lib}&docID={$doc->id}"), " " . $doc->title, '', "data-app='doc' title='{$doc->title}'") . '
  • '; + $html .= '
  • ' . html::a(inlink('objectLibs', "type={$doc->type}&objectID=$objectID&libID={$doc->lib}&docID={$doc->id}"), " " . $doc->title, '', "data-app='doc' title='{$doc->title}'") . '
  • '; } $collectionCount = $this->dao->select('count(id) as count')->from(TABLE_DOC)