* Fix bug.

This commit is contained in:
leiyong
2020-12-02 10:14:28 +08:00
parent b4f63971eb
commit 322e7112cc
+3 -2
View File
@@ -1109,6 +1109,7 @@ class docModel extends model
*/
public function getLimitLibs($type, $limit = 0)
{
$libs = array();
if($type == 'product' or $type == 'project')
{
$nonzeroLibs = array();
@@ -1121,7 +1122,8 @@ class docModel extends model
$projectID = $this->session->PRJ;
$executionStatus = strpos($this->config->doc->custom->showLibs, 'unclosed') !== false ? 'undone' : 'all';
if($type == 'product') $objectList = $this->loadModel('product')->getProductPairsByProject($projectID, 'all');
if($type == 'project') $objectList = $this->loadModel('project')->getExecutionsByProject($projectID, $executionStatus, 0, true);
if($type == 'project') $objectList = $this->loadModel('project')->getExecutionsByProject($projectID, 'all', 0, true);
if(empty($objectList)) $libs;
$table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT;
$stmt = $this->dao->select('*')->from(TABLE_DOCLIB)
@@ -1136,7 +1138,6 @@ class docModel extends model
}
$i = 1;
$libs = array();
while($docLib = $stmt->fetch())
{
if($limit && $i > $limit) break;