Merge branch 'liyuchun_fixbug_21632' into 'master'
* Fix bug #21632. See merge request easycorp/zentaopms!3024
This commit is contained in:
+10
-2
@@ -2251,9 +2251,17 @@ EOD;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(helper::isAjaxRequest()) die(json_encode(array('result' => false, 'message' => $this->lang->error->loginTimeout))); // Fix bug #14478.
|
||||
$uri = $this->app->getURI(true);
|
||||
if($module == 'message' and $method == 'ajaxgetmessage')
|
||||
{
|
||||
$uri = helper::createLink('my');
|
||||
}
|
||||
elseif(helper::isAjaxRequest())
|
||||
{
|
||||
die(json_encode(array('result' => false, 'message' => $this->lang->error->loginTimeout))); // Fix bug #14478.
|
||||
}
|
||||
|
||||
$referer = helper::safe64Encode($this->app->getURI(true));
|
||||
$referer = helper::safe64Encode($uri);
|
||||
print(js::locate(helper::createLink('user', 'login', "referer=$referer")));
|
||||
helper::end();
|
||||
}
|
||||
|
||||
@@ -457,12 +457,12 @@ class jobModel extends model
|
||||
|
||||
if($job->triggerType == 'tag')
|
||||
{
|
||||
$lastTag = $this->getLastTagByRepo($repo, $job);
|
||||
if($lastTag)
|
||||
$job->lastTag = $this->getLastTagByRepo($repo, $job);
|
||||
|
||||
if($job->lastTag)
|
||||
{
|
||||
$build->tag = $lastTag;
|
||||
$job->lastTag = $lastTag;
|
||||
$this->dao->update(TABLE_JOB)->set('lastTag')->eq($lastTag)->where('id')->eq($job->id)->exec();
|
||||
$build->tag = $job->lastTag;
|
||||
$this->dao->update(TABLE_JOB)->set('lastTag')->eq($job->lastTag)->where('id')->eq($job->id)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -422,11 +422,13 @@ class mr extends control
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->repo = $this->loadModel('repo')->getRepoByID($MR->repoID);
|
||||
$this->view->repoID = $MR->repoID;
|
||||
$this->view->diffs = $diffs;
|
||||
$this->view->encoding = $encoding;
|
||||
$this->view->arrange = $arrange;
|
||||
$this->view->repo = $this->loadModel('repo')->getRepoByID($MR->repoID);
|
||||
$this->view->repoID = $MR->repoID;
|
||||
$this->view->diffs = $diffs;
|
||||
$this->view->encoding = $encoding;
|
||||
$this->view->arrange = $arrange;
|
||||
$this->view->sourceBranch = $MR->sourceBranch;
|
||||
$this->view->targetBranch = $MR->targetBranch;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -1177,7 +1177,6 @@ class mrModel extends model
|
||||
$bugInfo['content'] = $data->steps;
|
||||
$bugInfo['title'] = $data->title;
|
||||
$bugInfo['objectType'] = 'bug';
|
||||
$bugInfo['entry'] = $data->entry;
|
||||
return $bugInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ if($repoExecution)
|
||||
}
|
||||
|
||||
$reviews = $this->mr->getReview($repoID, $MR->id);
|
||||
$v1 = isset($oldRevision) ? $oldRevision : 0;
|
||||
$v1 = str_replace('-', '*', $sourceBranch);
|
||||
$v2 = str_replace('-', '*', $targetBranch);
|
||||
|
||||
$this->loadModel('repo');
|
||||
|
||||
@@ -46,7 +47,7 @@ $taskModuleSelect = html::select('taskModule', $taskModules, $taskRepoModule,
|
||||
$taskUserSelect = html::select('taskAssignedTo', $taskMembers, '', 'class="form-control chosen"');
|
||||
$taskExecutionSelect = html::select('taskExecution', $taskExecutions, $repoExecution, 'class="form-control chosen" onchange="changeExecution(this)"');
|
||||
|
||||
$reviewUrl = $this->createLink('mr', 'addReview', "repoID=$repoID&mr={$MR->id}&v1=$v1&v2=");
|
||||
$reviewUrl = $this->createLink('mr', 'addReview', "repoID=$repoID&mr={$MR->id}&v1=$v1&v2=$v2");
|
||||
$productSelect = html::select('product', $products, $repoProduct, 'class="product form-control chosen" onchange="changeProduct(this)"');
|
||||
$branches = $this->loadModel('branch')->getPairs($repoProduct);
|
||||
$moduleSelect = html::select('module', $modules, $bugRepoModule, 'class="form-control chosen"');
|
||||
@@ -153,7 +154,6 @@ js::set('revision', '');
|
||||
<td colspan="3" class='form-actions'>
|
||||
<?php echo html::submitButton($lang->repo->submit, '', 'btn btn-wide btn-primary reviewSubmit');?>
|
||||
<?php echo html::commonButton($lang->cancel, "onclick='hiddenForm()'", 'btn btn-wide');?>
|
||||
<input type="hidden" id='entry' name="entry" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user