* [misc] add $type param to doc method getModulesOfLibs.

This commit is contained in:
sunhao
2024-11-07 10:04:12 +08:00
committed by 刘刚
parent 8c20240e32
commit 7e3f4c2935
+3 -2
View File
@@ -2728,14 +2728,15 @@ class docModel extends model
* Get modules from libs.
*
* @param array $libs Lib id list.
* @param string $type doc|api
* @access public
* @return array
*/
public function getModulesOfLibs(array $libs)
public function getModulesOfLibs(array $libs, $type = 'doc')
{
return $this->dao->select('*')->from(TABLE_MODULE)
->where('root')->in($libs)
->andWhere('type')->eq('doc')
->andWhere('type')->eq($type)
->andWhere('deleted')->eq(0)
->orderBy('grade desc, `order`')
->fetchAll('id');