+ Add the method to get the hidden projects for the user.

This commit is contained in:
dingguodong
2024-04-08 17:17:04 +08:00
parent 78675f7304
commit 9c4656cacf
+21
View File
@@ -336,4 +336,25 @@ class repoTao extends repoModel
$this->dao->insert(TABLE_REPOFILES)->data($copyFile)->exec();
}
}
/**
* Get the hidden projects for the user.
*
* @param string $user
* @return array
*/
protected function getHiddenProjects(string $user = '')
{
if(empty($user)) $user = 'system';
$hiddenProjects = $this->dao->select('`value`')->from(TABLE_CONFIG)
->where('module')->eq('repo')
->beginIF($user)->andWhere('owner')->eq($user)->fi()
->andWhere('`key`')->eq('hiddenProjects')
->fetch('value');
if($hiddenProjects) return json_decode($hiddenProjects, true);
return array();
}
}