* Fix systemMode bug.

This commit is contained in:
wangyuting2
2022-10-10 07:32:11 +00:00
parent 8fdde5fa0e
commit aa9bc2b8ec
107 changed files with 239 additions and 522 deletions
+1 -2
View File
@@ -176,8 +176,7 @@ class personnel extends control
$copyUsers = empty($copyID) ? array() : $this->personnel->getWhitelistAccount($copyID, $copyObjectType);
$appendUsers = array_unique($deptUsers + $copyUsers);
$objectName = $this->lang->execution->common;
if($this->config->systemMode == 'new') $objectName = $this->lang->projectCommon . $this->lang->execution->or . $objectName;
$objectName = $this->lang->projectCommon . $this->lang->execution->or . $objectName;
if($objectType == 'program') $objectName = $this->lang->program->common;
if($objectType == 'product') $objectName = $this->lang->productCommon;
if($objectType == 'project') $objectName = $this->lang->projectCommon;
+1 -1
View File
@@ -139,6 +139,6 @@ $(function()
$('#object_chosen').click(function()
{
if(systemMode == 'new' && objectType == 'sprint') $('#object_chosen ul li:first').append(' <label class="label">' + projectCommon + '</label>')
if(objectType == 'sprint') $('#object_chosen ul li:first').append(' <label class="label">' + projectCommon + '</label>')
})
})
+14 -23
View File
@@ -464,14 +464,11 @@ class personnelModel extends model
if($objectType == 'sprint')
{
$parentID = 0;
if($this->config->systemMode == 'new')
{
$this->loadModel('execution');
$execution = $this->execution->getByID($objectID);
$parentID = $execution->project;
$project = $this->execution->getByID($parentID);
$objects = array($project->id => $project->name);
}
$this->loadModel('execution');
$execution = $this->execution->getByID($objectID);
$parentID = $execution->project;
$project = $this->execution->getByID($parentID);
$objects = array($project->id => $project->name);
$objects += $this->dao->select('id,name')->from(TABLE_EXECUTION)
->where('project')->eq($parentID)
@@ -482,7 +479,7 @@ class personnelModel extends model
->fetchPairs();
foreach($objects as $id => &$object)
{
if($id != $parentID and $this->config->systemMode == 'new') $object = '&nbsp;&nbsp;&nbsp;' . $object;
if($id != $parentID) $object = '&nbsp;&nbsp;&nbsp;' . $object;
}
}
elseif($objectType == 'project')
@@ -637,13 +634,10 @@ class personnelModel extends model
$product = $this->loadModel('product')->getById($objectID);
if(empty($product)) return false;
if($this->config->systemMode == 'new')
{
$programWhitelist = $this->getWhitelistAccount($product->program, 'program');
$newWhitelist = array_merge($programWhitelist, $accounts);
$source = $source == 'upgrade' ? 'upgrade' : 'sync';
$this->updateWhitelist($newWhitelist, 'program', $product->program, 'whitelist', $source, $updateType);
}
$programWhitelist = $this->getWhitelistAccount($product->program, 'program');
$newWhitelist = array_merge($programWhitelist, $accounts);
$source = $source == 'upgrade' ? 'upgrade' : 'sync';
$this->updateWhitelist($newWhitelist, 'program', $product->program, 'whitelist', $source, $updateType);
/* Removal of persons from centralized program whitelisting. */
if($updateType == 'replace')
@@ -658,13 +652,10 @@ class personnelModel extends model
$sprint = $this->dao->select('id,project')->from(TABLE_PROJECT)->where('id')->eq($objectID)->fetch();
if(empty($sprint)) return false;
if($this->config->systemMode == 'new')
{
$projectWhitelist = $this->getWhitelistAccount($sprint->project, 'project');
$newWhitelist = array_merge($projectWhitelist, $accounts);
$source = $source == 'upgrade' ? 'upgrade' : 'sync';
$this->updateWhitelist($newWhitelist, 'project', $sprint->project, 'whitelist', $source, $updateType);
}
$projectWhitelist = $this->getWhitelistAccount($sprint->project, 'project');
$newWhitelist = array_merge($projectWhitelist, $accounts);
$source = $source == 'upgrade' ? 'upgrade' : 'sync';
$this->updateWhitelist($newWhitelist, 'project', $sprint->project, 'whitelist', $source, $updateType);
/* Removal of whitelisted persons from projects. */
if($updateType == 'replace')
@@ -13,7 +13,6 @@
<?php include '../../common/view/header.html.php';?>
<?php js::set('objectID', $objectID);?>
<?php js::set('objectType', $objectType);?>
<?php js::set('systemMode', $config->systemMode);?>
<?php js::set('projectCommon', $lang->projectCommon);?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>