* Modify a question.

This commit is contained in:
mayue
2021-12-21 17:43:47 +08:00
parent 111521f560
commit 807961ec25
3 changed files with 16 additions and 2 deletions
+3
View File
@@ -104,6 +104,8 @@ class projectrelease extends control
$this->app->loadConfig('release');
$this->config->projectrelease->create = $this->config->release->create;
$this->app->loadLang('release');
if(!empty($_POST))
{
$releaseID = $this->projectrelease->create($projectID);
@@ -130,6 +132,7 @@ class projectrelease extends control
$this->view->builds = $builds;
$this->view->lastRelease = $this->projectrelease->getLast($projectID);
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed');
$this->view->confirmLink = $this->lang->release->confirmLink;
$this->display();
}
+11 -2
View File
@@ -134,7 +134,7 @@ class projectreleaseModel extends model
->setIF($productID, 'product', $productID)
->setIF($branch, 'branch', $branch)
->stripTags($this->config->release->editor->create['id'], $this->config->allowedTags)
->remove('allchecker,files,labels,uid')
->remove('allchecker,files,labels,uid,sync')
->get();
/* Auto create build when release is not link build. */
@@ -175,7 +175,16 @@ class projectreleaseModel extends model
}
}
if($release->build) $release->branch = $this->dao->select('branch')->from(TABLE_BUILD)->where('id')->eq($release->build)->fetch('branch');
if($release->build)
{
$buildInfo = $this->dao->select('branch, stories, bugs')->from(TABLE_BUILD)->where('id')->eq($release->build)->fetch();
$release->branch = $buildInfo->branch;
if($this->post->sync == 'true');
{
$release->stories = $buildInfo->stories;
$release->bugs = $buildInfo->bugs;
}
}
$release = $this->loadModel('file')->processImgURL($release, $this->config->release->editor->create['id'], $this->post->uid);
$this->dao->insert(TABLE_RELEASE)->data($release)
@@ -12,6 +12,7 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::set('confirmLink', $confirmLink);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
@@ -74,6 +75,7 @@
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo html::hidden('sync', 'false');?>
<?php echo html::backButton();?>
</td>
</tr>