* [bug #57037, done, 0.2h] fix modules data in api lib in product/project space.

This commit is contained in:
sunhao
2024-11-14 15:28:42 +08:00
committed by 刘刚
parent 5e925bb613
commit c8dd906210
+4 -2
View File
@@ -2746,11 +2746,13 @@ class docModel extends model
* @access public
* @return array
*/
public function getModulesOfLibs(array $libs, $type = 'doc')
public function getModulesOfLibs(array $libs, $type = 'doc,api')
{
$types = explode(',', $type);
return $this->dao->select('*')->from(TABLE_MODULE)
->where('root')->in($libs)
->andWhere('type')->eq($type)
->beginIF(count($types) > 1)->andWhere('type')->in($types)->fi()
->beginIF(count($types) == 1)->andWhere('type')->eq($type)->fi()
->andWhere('deleted')->eq(0)
->orderBy('grade desc, `order`')
->fetchAll('id');