Merge branch 'sprint/195_mayue_bug#22972' into 'zentaopms_195'

* Fix bug #22972.

See merge request easycorp/zentaopms!3617
This commit is contained in:
孙广明
2022-05-26 06:52:30 +00:00
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -109,6 +109,9 @@ class projectreleaseModel extends model
$oldRelease = $this->dao->select('*')->from(TABLE_RELEASE)->where('id')->eq($releaseID)->fetch();
$branch = $this->dao->select('branch')->from(TABLE_BUILD)->where('id')->eq((int)$this->post->build)->fetch('branch');
/* Check build if build is required. */
if(strpos($this->config->release->edit->requiredFields, 'build') !== false and $this->post->build == false) return dao::$errors['build'] = sprintf($this->lang->error->notempty, $this->lang->release->build);
$release = fixer::input('post')->stripTags($this->config->release->editor->edit['id'], $this->config->allowedTags)
->add('branch', (int)$branch)
->join('mailto', ',')
+1 -1
View File
@@ -3,7 +3,7 @@ $config->release = new stdclass();
$config->release->create = new stdclass();
$config->release->edit = new stdclass();
$config->release->create->requiredFields = 'name,date';
$config->release->edit->requiredFields = 'name,date';
$config->release->edit->requiredFields = 'name,build,date';
$config->release->editor = new stdclass();
$config->release->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');