This commit is contained in:
tianshujie
2023-04-12 11:13:11 +08:00
parent 38b99d75ed
commit 6ef8f58a4f
+2 -2
View File
@@ -75,7 +75,7 @@ class docModel extends model
*/
public function getLibs($type = '', $extra = '', $appendLibs = '', $objectID = 0, $excludeType = '')
{
if($type == 'all' or $type == 'includeDeleted')
if(in_array($type, array('all', 'includeDeleted', 'hasApi')))
{
$stmt = $this->dao->select('*')->from(TABLE_DOCLIB)
->where('vision')->eq($this->config->vision)
@@ -90,7 +90,7 @@ class docModel extends model
$stmt = $this->dao->select('*')->from(TABLE_DOCLIB)
->where('deleted')->eq(0)
->andWhere('vision')->eq($this->config->vision)
->beginIF($type != 'hasApi')->andWhere('type')->eq($type)->fi()
->beginIF($type)->andWhere('type')->eq($type)->fi()
->beginIF(!$type)->andWhere('type')->ne('api')->fi()
->beginIF($objectID and strpos(',product,project,execution,', ",$type,") !== false)->andWhere($type)->eq($objectID)->fi()
->orderBy('id_asc')