Merge branch 'master_xieqiyu_19665' into 'master'

* Fix bug#19665.

See merge request easycorp/zentaopms!2676
This commit is contained in:
孙广明
2022-03-31 09:42:04 +00:00
2 changed files with 9 additions and 7 deletions
+8 -6
View File
@@ -253,10 +253,12 @@ class executionModel extends model
{
$this->session->set('execution', key($executions), $this->app->tab);
$execution = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->andWhere('type')->in('sprint,stage,kanban')->fetch();
if(empty($execution)) return js::error($this->lang->notFound);
if($executionID && strpos(",{$this->app->user->view->sprints},", ",{$executionID},") === false) $this->accessDenied();
if($executionID)
{
$execution = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->andWhere('type')->in('sprint,stage,kanban')->fetch();
if(empty($execution)) return js::error($this->lang->notFound);
if(strpos(",{$this->app->user->view->sprints},", ",{$executionID},") === false) $this->accessDenied();
}
}
$this->setProjectSession($this->session->execution);
@@ -512,9 +514,9 @@ class executionModel extends model
->where('id')->eq($executionID)
->limit(1)
->exec();
if(dao::isError()) return false;
/* Get team and language item. */
$this->loadModel('user');
$team = $this->user->getTeamMemberPairs($executionID, 'execution');
+1 -1
View File
@@ -44,7 +44,7 @@ class task extends control
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
parse_str($extra, $output);
$executions = $this->execution->getPairs();
$executions = $this->execution->getPairs(0, 'all', !common::checkNotCN() ? 'noclosed' : '');
$executionID = $this->execution->saveState($executionID, $executions);
$this->execution->setMenu($executionID);