diff --git a/module/gitlab/lang/de.php b/module/gitlab/lang/de.php index 5094d2c1ce..08f9783866 100644 --- a/module/gitlab/lang/de.php +++ b/module/gitlab/lang/de.php @@ -120,6 +120,7 @@ $lang->gitlab->apiError[] = 'avatar is invalid'; $lang->gitlab->apiError[] = 'file format is not supported. Please try one of the following supported formats: image/png, image/jpeg, image/gif, image/bmp, image/tiff, image/vnd.microsoft.icon'; $lang->gitlab->apiError[] = 'must not contain commonly used combinations of words and letters'; $lang->gitlab->apiError[] = 'must be greater than or equal to 0'; +$lang->gitlab->apiError[] = '500 Internal Server Error'; $lang->gitlab->errorLang[] = 'You cannot set Internal as its Visibility Level, if it is private in GitLab.'; $lang->gitlab->errorLang[] = 'You cannot set Public as its Visibility Level, if it is private in GitLab.'; @@ -139,6 +140,7 @@ $lang->gitlab->errorLang[] = 'Avatar is invalid'; $lang->gitlab->errorLang[] = 'File format is not supported. Please try one of the following supported formats: image/png, image/jpeg, image/gif, image/bmp, image/tiff, image/vnd.microsoft.icon'; $lang->gitlab->errorLang[] = 'must not contain commonly used combinations of words and letters'; $lang->gitlab->errorLang[] = 'must be greater than or equal to 0'; +$lang->gitlab->errorLang[] = '500 Internal Server Error'; $lang->gitlab->errorResonse['Email has already been taken'] = 'Email has already been taken'; $lang->gitlab->errorResonse['Username has already been taken'] = 'Username has already been taken'; diff --git a/module/gitlab/lang/en.php b/module/gitlab/lang/en.php index 501e0742a5..28a04bf7d7 100644 --- a/module/gitlab/lang/en.php +++ b/module/gitlab/lang/en.php @@ -120,6 +120,7 @@ $lang->gitlab->apiError[] = 'avatar is invalid'; $lang->gitlab->apiError[] = 'file format is not supported. Please try one of the following supported formats: image/png, image/jpeg, image/gif, image/bmp, image/tiff, image/vnd.microsoft.icon'; $lang->gitlab->apiError[] = 'must not contain commonly used combinations of words and letters'; $lang->gitlab->apiError[] = 'must be greater than or equal to 0'; +$lang->gitlab->apiError[] = '500 Internal Server Error'; $lang->gitlab->errorLang[] = 'You cannot set Internal as its Visibility Level, if it is private in GitLab.'; $lang->gitlab->errorLang[] = 'You cannot set Public as its Visibility Level, if it is private in GitLab.'; @@ -139,6 +140,7 @@ $lang->gitlab->errorLang[] = 'Avatar is invalid'; $lang->gitlab->errorLang[] = 'File format is not supported. Please try one of the following supported formats: image/png, image/jpeg, image/gif, image/bmp, image/tiff, image/vnd.microsoft.icon'; $lang->gitlab->errorLang[] = 'must not contain commonly used combinations of words and letters'; $lang->gitlab->errorLang[] = 'must be greater than or equal to 0'; +$lang->gitlab->errorLang[] = '500 Internal Server Error'; $lang->gitlab->errorResonse['Email has already been taken'] = 'Email has already been taken'; $lang->gitlab->errorResonse['Username has already been taken'] = 'Username has already been taken'; diff --git a/module/gitlab/lang/fr.php b/module/gitlab/lang/fr.php index 9bb09b3a3a..fbb08f9c2d 100644 --- a/module/gitlab/lang/fr.php +++ b/module/gitlab/lang/fr.php @@ -120,6 +120,7 @@ $lang->gitlab->apiError[] = 'avatar is invalid'; $lang->gitlab->apiError[] = 'file format is not supported. Please try one of the following supported formats: image/png, image/jpeg, image/gif, image/bmp, image/tiff, image/vnd.microsoft.icon'; $lang->gitlab->apiError[] = 'must not contain commonly used combinations of words and letters'; $lang->gitlab->apiError[] = 'must be greater than or equal to 0'; +$lang->gitlab->apiError[] = '500 Internal Server Error'; $lang->gitlab->errorLang[] = 'You cannot set Internal as its Visibility Level, if it is private in GitLab.'; $lang->gitlab->errorLang[] = 'You cannot set Public as its Visibility Level, if it is private in GitLab.'; @@ -139,6 +140,7 @@ $lang->gitlab->errorLang[] = 'Avatar is invalid'; $lang->gitlab->errorLang[] = 'File format is not supported. Please try one of the following supported formats: image/png, image/jpeg, image/gif, image/bmp, image/tiff, image/vnd.microsoft.icon'; $lang->gitlab->errorLang[] = 'must not contain commonly used combinations of words and letters'; $lang->gitlab->errorLang[] = 'must be greater than or equal to 0'; +$lang->gitlab->errorLang[] = '500 Internal Server Error'; $lang->gitlab->errorResonse['Email has already been taken'] = 'Email has already been taken'; $lang->gitlab->errorResonse['Username has already been taken'] = 'Username has already been taken'; diff --git a/module/gitlab/lang/zh-cn.php b/module/gitlab/lang/zh-cn.php index 479e46fe6b..56ac7ef672 100644 --- a/module/gitlab/lang/zh-cn.php +++ b/module/gitlab/lang/zh-cn.php @@ -120,6 +120,7 @@ $lang->gitlab->apiError[] = 'avatar is invalid'; $lang->gitlab->apiError[] = 'file format is not supported. Please try one of the following supported formats: image/png, image/jpeg, image/gif, image/bmp, image/tiff, image/vnd.microsoft.icon'; $lang->gitlab->apiError[] = 'must not contain commonly used combinations of words and letters'; $lang->gitlab->apiError[] = 'must be greater than or equal to 0'; +$lang->gitlab->apiError[] = '500 Internal Server Error'; $lang->gitlab->errorLang[] = '私有分组的项目,可见性级别不能设为内部。'; $lang->gitlab->errorLang[] = '私有分组的项目,可见性级别不能设为公开。'; @@ -139,6 +140,7 @@ $lang->gitlab->errorLang[] = '头像格式不正确'; $lang->gitlab->errorLang[] = '文件格式不支持,请尝试以下格式:image/png,image/jpeg,image/gif,image/bmp,image/tiff,image/vnd.microsoft.icon'; $lang->gitlab->errorLang[] = '不能使用常用的数字或字母组合'; $lang->gitlab->errorLang[] = '必须大于等于0'; +$lang->gitlab->errorLang[] = '服务器返回错误:500'; $lang->gitlab->errorResonse['Email has already been taken'] = '邮箱已存在'; $lang->gitlab->errorResonse['Username has already been taken'] = '用户名已存在'; diff --git a/module/job/model.php b/module/job/model.php index ccdc16fd6b..11c689ab11 100644 --- a/module/job/model.php +++ b/module/job/model.php @@ -417,14 +417,17 @@ class jobModel extends model /* Set pipeline params. */ $customParams = json_decode($job->customParam); $variables = array(); - foreach($customParams as $paramName => $paramValue) + if($customParams) { - $variable = array(); - $variable['key'] = $paramName; - $variable['value'] = $paramValue; - $variable['variable_type'] = "env_var"; + foreach($customParams as $paramName => $paramValue) + { + $variable = array(); + $variable['key'] = $paramName; + $variable['value'] = $paramValue; + $variable['variable_type'] = "env_var"; - $variables[] = $variable; + $variables[] = $variable; + } } if(!empty($variables)) $pipelineParams->variables = $variables; diff --git a/module/mr/model.php b/module/mr/model.php index 1ceb8a7077..76238071d5 100644 --- a/module/mr/model.php +++ b/module/mr/model.php @@ -1,5 +1,8 @@ jobID) && $MR->jobID) $this->execJob($MRID, (int)$MR->jobID); + if($needExecJob && isset($MR->jobID) && $MR->jobID) + { + $this->execJob($MRID, (int)$MR->jobID); + if(dao::isError()) return array('result' => 'fail', 'message' => import("\n", dao::getError())); + } /* Known issue: `reviewer_ids` takes no effect. */ $rawMR = $this->apiUpdateMR($oldMR, $MR);