Merge branch 'master' of http://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -371,7 +371,8 @@ class productModel extends model
|
||||
public function getProductIDByProject($projectID, $isFirst = true)
|
||||
{
|
||||
$products = $this->dao->select('product')->from(TABLE_PROJECTPRODUCT)
|
||||
->where('product')->in($this->app->user->view->products)
|
||||
->where('1=1')
|
||||
->beginIF(!$this->app->user->admin)->andWhere('product')->in($this->app->user->view->products)->fi()
|
||||
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
|
||||
->fetchPairs();
|
||||
|
||||
|
||||
@@ -350,7 +350,7 @@ class repoModel extends model
|
||||
$scm = $repo->SCM == 'Subversion' ? 'svn' : 'git';
|
||||
if($this->checkPriv($repo))
|
||||
{
|
||||
if($type == 'project' or $type == 'execution')
|
||||
if(($type == 'project' or $type == 'execution') and $projectID)
|
||||
{
|
||||
foreach($productIdList as $productID)
|
||||
{
|
||||
@@ -1510,6 +1510,7 @@ class repoModel extends model
|
||||
elseif($taskAction == 'finish' and in_array($task->status, array('wait', 'pause', 'doing')))
|
||||
{
|
||||
$this->post->set('finishedDate', date('Y-m-d'));
|
||||
$this->post->set('realStarted', date('Y-m-d'));
|
||||
$this->post->set('currentConsumed', $this->post->consumed);
|
||||
$this->post->set('consumed', $this->post->consumed + $task->consumed);
|
||||
$changes = $this->task->finish($taskID);
|
||||
|
||||
Reference in New Issue
Block a user