* Fix bug#21498
This commit is contained in:
@@ -133,7 +133,7 @@ class gitModel extends model
|
||||
{
|
||||
$gitlabUserList = $this->loadModel('gitlab')->apiGetUsers($repo->gitlab);
|
||||
$acountIDPairs = $this->gitlab->getUserIdAccountPairs($repo->gitlab);
|
||||
foreach($gitlabUserList as $gitlabUser) $gitlabAccountPairs[$gitlabUser->realname] = zget($acountIDPairs, $gitlabUser->id, $gitlabUser->realname);
|
||||
foreach($gitlabUserList as $gitlabUser) $gitlabAccountPairs[$gitlabUser->realname] = zget($acountIDPairs, $gitlabUser->id, '');
|
||||
}
|
||||
|
||||
/* Update code commit history. */
|
||||
|
||||
@@ -1568,12 +1568,15 @@ class repoModel extends model
|
||||
*/
|
||||
public function saveAction2PMS($objects, $log, $repoRoot = '', $encodings = 'utf-8', $scm = 'svn', $gitlabAccountPairs = array())
|
||||
{
|
||||
if(empty($gitlabAccountPairs))
|
||||
if(isset($gitlabAccountPairs[$log->author]) and $gitlabAccountPairs[$log->author])
|
||||
{
|
||||
$log->author = $gitlabAccountPairs[$log->author];
|
||||
}
|
||||
else
|
||||
{
|
||||
$commiters = $this->loadModel('user')->getCommiters('account');
|
||||
$log->author = zget($commiters, $log->author);
|
||||
}
|
||||
$log->author = isset($gitlabAccountPairs[$log->author]) ? $gitlabAccountPairs[$log->author] : $log->author;
|
||||
|
||||
if(isset($this->app->user))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user