* Adjust code for feedback #2274.

This commit is contained in:
liuhong
2023-02-21 09:50:19 +00:00
parent 8c7788aa03
commit f5056eb802
2 changed files with 7 additions and 5 deletions
+6 -4
View File
@@ -478,11 +478,13 @@ class buildModel extends model
*/
public function update($buildID)
{
$buildID = (int)$buildID;
$oldBuild = $this->dao->select('*')->from(TABLE_BUILD)->where('id')->eq($buildID)->fetch();
$build = fixer::input('post')->stripTags($this->config->build->editor->edit['id'], $this->config->allowedTags)
$buildID = (int)$buildID;
$oldBuild = $this->dao->select('*')->from(TABLE_BUILD)->where('id')->eq($buildID)->fetch();
$newProduct = $this->dao->select('id,type')->from(TABLE_PRODUCT)->where('id')->eq($_POST['product'])->fetchPairs();
$branch = (!isset($_POST['branch']) or $newProduct == 'normal') ? 0 : $oldBuild->branch;
$build = fixer::input('post')->stripTags($this->config->build->editor->edit['id'], $this->config->allowedTags)
->add('id', $buildID)
->setIF(!isset($_POST['branch']), 'branch', $oldBuild->branch)
->setDefault('branch', $branch)
->setDefault('product', $oldBuild->product)
->setDefault('builds', '')
->cleanInt('product,execution')
+1 -1
View File
@@ -226,7 +226,7 @@ class company extends control
$executionList = $this->execution->getByIdList(array_keys($executions));
foreach($executionList as $executionID => $execution)
{
if(isset($projects[$execution->project])) $executions[$execution->id] = $projects[$execution->project] . $executions[$execution->id];
if(isset($projects[$execution->project])) $executions[$execution->id] = $projects[$execution->project] . $executions[$execution->id];
}
$executions = array($this->lang->execution->common) + $executions;