Merge branch 'devops24'

This commit is contained in:
liyuchun
2022-03-22 08:28:32 +08:00
50 changed files with 339 additions and 184 deletions
+3 -2
View File
@@ -158,10 +158,11 @@ class userModel extends model
/**
* Get commiters from the user table.
*
* @param string $field
* @access public
* @return array
*/
public function getCommiters()
public function getCommiters($field = 'realname')
{
$rawCommiters = $this->dao->select('commiter, account, realname')->from(TABLE_USER)->where('commiter')->ne('')->fetchAll();
if(!$rawCommiters) return array();
@@ -172,7 +173,7 @@ class userModel extends model
$userCommiters = explode(',', $commiter->commiter);
foreach($userCommiters as $userCommiter)
{
$commiters[$userCommiter] = $commiter->realname ? $commiter->realname : $commiter->account;
$commiters[$userCommiter] = $commiter->$field ? $commiter->$field : $commiter->account;
}
}