Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
+18
-1
@@ -578,7 +578,24 @@ class commonModel extends model
|
||||
/* When last divider is not used in mainNav, use it next menu. */
|
||||
$divider = ($divider || ($lastItem != $key) && strpos($lang->dividerMenu, ",{$group},") !== false) ? true : false;
|
||||
|
||||
if(!common::hasPriv($currentModule, $currentMethod)) continue;
|
||||
if(!common::hasPriv($currentModule, $currentMethod))
|
||||
{
|
||||
$hidden = true;
|
||||
if($currentModule == 'assetlib')
|
||||
{
|
||||
$methodList = array('caselib', 'issuelib', 'risklib', 'opportunitylib', 'practicelib', 'componentlib');
|
||||
foreach($methodList as $method)
|
||||
{
|
||||
if(common::hasPriv($currentModule, $method))
|
||||
{
|
||||
$hidden = false;
|
||||
$currentMethod = $method;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($hidden) continue;
|
||||
}
|
||||
|
||||
if($divider and !empty($items))
|
||||
{
|
||||
|
||||
@@ -1307,6 +1307,13 @@ class projectModel extends model
|
||||
$this->dao->insert(TABLE_TEAM)->data($member)->exec();
|
||||
}
|
||||
|
||||
/* Update the viewers of the project main doc library. */
|
||||
$authorizedUsers = $this->dao->select('users')->from(TABLE_DOCLIB)->where('type')->eq('project')->andWhere('project')->eq($projectID)->andWhere('main')->eq(1)->fetch();
|
||||
$authorizedUsers = empty($authorizedUsers) ? array() : explode(',', trim($authorizedUsers->users, ','));
|
||||
$authorizedUsers = array_merge($authorizedUsers, array_filter($accounts));
|
||||
$authorizedUsers = ',' . implode(',', array_unique($authorizedUsers)) . ',';
|
||||
$this->dao->update(TABLE_DOCLIB)->set('users')->eq($authorizedUsers)->where('type')->eq('project')->andWhere('project')->eq($projectID)->andWhere('main')->eq(1)->exec();
|
||||
|
||||
/* Only changed account update userview. */
|
||||
$oldAccounts = array_keys($oldJoin);
|
||||
$changedAccounts = array_diff($accounts, $oldAccounts);
|
||||
|
||||
@@ -784,7 +784,7 @@ class task extends control
|
||||
}
|
||||
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this', "function(){parent.parent.location.reload();}"));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
@@ -943,7 +943,7 @@ class task extends control
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this', "function(){parent.parent.location.reload();}"));
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api')
|
||||
{
|
||||
return $this->send(array('result' => 'success', 'data' => $taskID));
|
||||
@@ -1087,7 +1087,7 @@ class task extends control
|
||||
|
||||
$this->executeHooks($taskID);
|
||||
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this', "function(){parent.parent.location.reload();}"));
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api')
|
||||
{
|
||||
die(array('status' => 'success', 'data' => $taskID));
|
||||
|
||||
@@ -4518,6 +4518,7 @@ class upgradeModel extends model
|
||||
$this->dao->update(TABLE_BUILD)->set('project')->eq($projectID)->where('execution')->in($sprintIdList)->andWhere('project')->eq(0)->exec();
|
||||
$this->dao->update(TABLE_BUG)->set('project')->eq($projectID)->where('execution')->in($sprintIdList)->andWhere('project')->eq(0)->exec();
|
||||
$this->dao->update(TABLE_DOC)->set('project')->eq($projectID)->set('type')->eq('execution')->where("lib IN(SELECT id from " . TABLE_DOCLIB . " WHERE type = 'project' and execution " . helper::dbIN($sprintIdList) . ')')->exec();
|
||||
$this->dao->update(TABLE_DOCLIB)->set('project')->eq($projectID)->where('type')->eq('execution')->andWhere('execution')->in($sprintIdList)->exec();
|
||||
|
||||
/* Put sprint stories into project story mdoule. */
|
||||
$sprintStories = $this->dao->select('*')->from(TABLE_PROJECTSTORY)
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user