Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into tsj_fixbug

This commit is contained in:
caoyanyi
2023-03-16 14:32:19 +08:00
15 changed files with 40 additions and 19 deletions

View File

@@ -102,10 +102,10 @@ zentaoxx:
mkdir zentaoxx/db/
cp zentaoxx/db_bak/upgradexuanxuan*.sql zentaoxx/db_bak/xuanxuan.sql zentaoxx/db/
rm -rf zentaoxx/db_bak/
sed -i "s/\$$accountAdmin = \$$this->dao->select('account, admin')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch();/\$$accountAdmin = \$$this->dao->select('account')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch();\n\$$admins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\n\$$adminArray = explode(',', \$$admins);\n\$$accountAdmin->admin = in_array(\$$accountAdmin->account, \$$adminArray) ? 'super' : '';\n/" zentaoxx/extension/xuan/im/model/chat.php
sed -i "s/\$$accountAdmin = \$$this->dao->select('account, admin')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch();/\$$accountAdmin = \$$this->dao->select('account')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch();\n\$$sysAdmins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\n\$$sysAdminArray = explode(',', \$$sysAdmins);\n\$$accountAdmin->admin = in_array(\$$accountAdmin->account, \$$sysAdminArray) ? 'super' : '';\n/" zentaoxx/extension/xuan/im/model/chat.php
sed -i "s/\$$sysAdmins = \$$this->dao->select('id')->from(TABLE_USER)->where('admin')->eq('super')->fetchPairs();/\$$account = \$$this->loadModel('user')->getById(\$$userID);\n\$$admins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\n\$$adminArray = explode(',', \$$admins);\nreturn in_array(\$$account, \$$adminArray);\n/" zentaoxx/extension/xuan/im/model/chat.php
sed -i "/->on('tc.ownedBy=tu.account')/{ N ; s/type/tc.type/}" zentaoxx/extension/xuan/im/model/chat.php
sed -i "s/\$$super = \$$this->dao->select('admin')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch('admin');/\$$account = \$$this->dao->select('account')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch('account');\n\$$admins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\n\$$adminArray = explode(',', \$$admins);\n\$$super = in_array(\$$account, \$$adminArray) ? 'super' : '';/g" zentaoxx/extension/xuan/im/control.php
sed -i "s/\$$super = \$$this->dao->select('admin')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch('admin');/\$$account = \$$this->dao->select('account')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch('account');\n\$$sysAdmins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\n\$$sysAdminArray = explode(',', \$$sysAdmins);\n\$$super = in_array(\$$account, \$$sysAdminArray) ? 'super' : '';/g" zentaoxx/extension/xuan/im/control.php
sed -i "/foreach(\$$users as \$$user)/i \$$admins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\$$adminArray = explode(',', \$$admins);" zentaoxx/extension/xuan/im/model/user.php
sed -i "/if(\!isset(\$$user->signed)) \$$user->signed = 0;/a \$$user->admin = in_array(\$$user->account, \$$adminArray) ? 'super' : '';" zentaoxx/extension/xuan/im/model/user.php
sed -i "/updateUser->ping/d" zentaoxx/extension/xuan/im/model/user.php

View File

@@ -111,7 +111,13 @@ class router extends baseRouter
/* Replace main nav lang. */
if($moduleName == 'common' and $this->dbh and !empty($this->config->db->name))
{
$customMenus = $this->dbh->query('SELECT * FROM' . TABLE_LANG . "WHERE `module`='common' AND `section`='mainNav' AND `lang`='{$this->clientLang}' AND `vision`='{$this->config->vision}'")->fetchAll();
$customMenus = array();
try
{
$customMenus = $this->dbh->query('SELECT * FROM' . TABLE_LANG . "WHERE `module`='common' AND `section`='mainNav' AND `lang`='{$this->clientLang}' AND `vision`='{$this->config->vision}'")->fetchAll();
}
catch(PDOException $exception){}
foreach($customMenus as $menu)
{
$menuKey = $menu->key;
@@ -317,7 +323,12 @@ class router extends baseRouter
}
/* Replace common lang. */
$customMenus = $this->dbh->query('SELECT * FROM' . TABLE_LANG . "WHERE `module`='common' AND `lang`='{$this->clientLang}' AND `section`='' AND `vision`='{$config->vision}'")->fetchAll();
$customMenus = array();
try
{
$customMenus = $this->dbh->query('SELECT * FROM' . TABLE_LANG . "WHERE `module`='common' AND `lang`='{$this->clientLang}' AND `section`='' AND `vision`='{$config->vision}'")->fetchAll();
}
catch(PDOException $exception){}
foreach($customMenus as $menu) if(isset($lang->{$menu->key})) $lang->{$menu->key} = $menu->value;
}
}

View File

@@ -18,7 +18,7 @@ $lang->dev->paramRange = 'Parameter Range: %s';
$lang->dev->paramDate = 'Date format: YY-mm-dd, e.g 2019-01-01';
$lang->dev->paramColor = 'Color format: #RGB, e.g. #3da7f5';
$lang->dev->paramMailto = "User account. Separate accounts by ','.";
$lang->dev->noteEditor = "The editor is disabled for security reasons. To use this feature, please go to the official website to download and install the plugin of the <a href='https://www.zentao.net/extension-viewExt-150.html' target='_blank'>editor</a>.";
$lang->dev->noteEditor = "The editor is disabled for security reasons. To use this feature, Please turn on.";
$lang->dev->noteTranslate = "The translation is disabled for security reasons. To use this feature, please go to the official website to download and install the plugin of <a href='https://www.zentao.net/extension-viewExt-151.html' target='_blank'>translation</a>.";
$lang->dev->confirmRestore = 'Do you want to reset?';

View File

@@ -18,7 +18,7 @@ $lang->dev->paramRange = 'Parameter Range: %s';
$lang->dev->paramDate = 'Date format: YY-mm-dd, e.g 2019-01-01';
$lang->dev->paramColor = 'Color format: #RGB, e.g. #3da7f5';
$lang->dev->paramMailto = "User account. Separate accounts by ','.";
$lang->dev->noteEditor = "The editor is disabled for security reasons. To use this feature, please go to the official website to download and install the plugin of the <a href='https://www.zentao.net/extension-viewExt-150.html' target='_blank'>editor</a>.";
$lang->dev->noteEditor = "The editor is disabled for security reasons. To use this feature, Please turn on.";
$lang->dev->noteTranslate = "The translation is disabled for security reasons. To use this feature, please go to the official website to download and install the plugin of <a href='https://www.zentao.net/extension-viewExt-151.html' target='_blank'>translation</a>.";
$lang->dev->confirmRestore = 'Do you want to reset?';

View File

@@ -18,7 +18,7 @@ $lang->dev->paramRange = 'Parameter Range: %s';
$lang->dev->paramDate = 'Date format: YY-mm-dd, e.g 2019-01-01';
$lang->dev->paramColor = 'Color format: #RGB, e.g. #3da7f5';
$lang->dev->paramMailto = "User account. Separate accounts by ','.";
$lang->dev->noteEditor = "The editor is disabled for security reasons. To use this feature, please go to the official website to download and install the plugin of the <a href='https://www.zentao.net/extension-viewExt-150.html' target='_blank'>editor</a>.";
$lang->dev->noteEditor = "The editor is disabled for security reasons. To use this feature, Please turn on.";
$lang->dev->noteTranslate = "The translation is disabled for security reasons. To use this feature, please go to the official website to download and install the plugin of <a href='https://www.zentao.net/extension-viewExt-151.html' target='_blank'>translation</a>.";
$lang->dev->confirmRestore = 'Do you want to reset?';

View File

@@ -27,5 +27,5 @@
#cfdChart {margin-top: -20px;}
#triggerModal .modal-dialog {top: 15% !important; overflow-y: auto; max-height: 80%;}
#triggerModal .modal-dialog {top: 15% !important; max-height: 80%;}
#triggerModal .modal-dialog::-webkit-scrollbar-track {background-color: white;}

View File

@@ -654,8 +654,8 @@ $lang->execution->gantt->exportFail = '导出失败。';
$lang->execution->boardColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#7FBB00', '#424BAC', '#66c5f8', '#EC2761');
$lang->execution->linkBranchStoryByPlanTips = "执行按计划关联需求时,只导入本执行所关联%s的激活状态的需求。";
$lang->execution->linkNormalStoryByPlanTips = "执行按计划关联需求时,只导入激活状态的需求。";
$lang->execution->linkBranchStoryByPlanTips = "{$lang->execution->common}按计划关联需求时,只导入本{$lang->execution->common}所关联%s的激活状态的需求。";
$lang->execution->linkNormalStoryByPlanTips = "{$lang->execution->common}按计划关联需求时,只导入激活状态的需求。";
$lang->execution->featureBar['dynamic']['all'] = '全部';
$lang->execution->featureBar['dynamic']['today'] = '今天';

View File

@@ -5684,12 +5684,13 @@ class executionModel extends model
*/
public function generateRow($executions, $users, $productID)
{
$rows = array();
$today = helper::today();
$rows = array();
foreach($executions as $id => $execution)
{
$label = $execution->type == 'stage' ? 'label-warning' : 'label-info';
$link = $execution->type == 'kanban' ? helper::createLink('execution', 'kanban', "id=$execution->id") : helper::createLink('execution', 'task', "id=$execution->id");
$execution->name = "<span class='project-type-label label label-outline $label'>{$this->lang->execution->typeList[$execution->type]}</span> " . (empty($execution->children) ? html::a($link, $execution->name, '_self', 'class="text-primary"') : $execution->name);
$execution->name = "<span class='project-type-label label label-outline $label'>{$this->lang->execution->typeList[$execution->type]}</span> " . (empty($execution->children) ? html::a($link, $execution->name, '_self', 'class="text-primary"') : $execution->name) . (strtotime($today) > strtotime($execution->end) ? '<span class="label label-danger label-badge">' . $this->lang->execution->delayed . '</span>' : '');;
$execution->project = $execution->projectName;
$execution->parent = ($execution->parent and $execution->grade > 1) ? $execution->parent : '';
$execution->asParent = !empty($execution->children);

View File

@@ -404,7 +404,7 @@
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon icon-close"></i></button>
<?php
$linkStoryByPlanTips = $multiBranch ? sprintf($lang->execution->linkBranchStoryByPlanTips, $lang->project->branch) : $lang->execution->linkNormalStoryByPlanTips;
$linkStoryByPlanTips = $execution->multiple ? $linkStoryByPlanTips : str_replace($lang->executionCommon, $lang->projectCommon, $linkStoryByPlanTips);
$linkStoryByPlanTips = $execution->multiple ? $linkStoryByPlanTips : str_replace($lang->execution->common, $lang->projectCommon, $linkStoryByPlanTips);
?>
<h4 class="modal-title"><?php echo $lang->execution->linkStoryByPlan;?></h4><?php echo '(' . $linkStoryByPlanTips . ')';?>
</div>

View File

@@ -355,7 +355,7 @@ class tree extends control
$parentModules = $this->tree->getParents($currentModuleID);
$newModule = (version_compare($execution->openedVersion, '4.1', '>') and $products) ? true : false;
$title = $this->lang->tree->manageExecution;
$title = $execution->multiple ? $this->lang->tree->manageExecution : $this->lang->tree->manageProject;
$position[] = html::a($this->createLink('execution', 'task', "executionID=$rootID"), $execution->name);
$position[] = $this->lang->tree->manageExecution;
@@ -363,6 +363,7 @@ class tree extends control
$this->view->position = $position;
$this->view->rootID = $rootID;
$this->view->productID = $productID;
$this->view->execution = $execution;
$this->view->allProject = $executions;
$this->view->newModule = $newModule;
$this->view->modules = $this->tree->getTaskTreeMenu($rootID, $productID, $rooteModuleID = 0, array('treeModel', 'createTaskManageLink'), 'allModule');

View File

@@ -18,7 +18,8 @@ $lang->tree->browseTask = 'Aufgaben Modul verwalten';
$lang->tree->manage = 'Modul verwalten';
$lang->tree->fix = 'Fix';
$lang->tree->manageProduct = "Verwalte {$lang->productCommon}";
$lang->tree->manageExecution = "Verwalte {$lang->executionCommon}";
$lang->tree->manageProject = "Verwalte {$lang->projectCommon}";
$lang->tree->manageExecution = "Verwalte {$lang->execution->common}";
$lang->tree->manageLine = "Manage Product Line";
$lang->tree->manageBug = 'Verwalte Bugs';
$lang->tree->manageCase = 'Verwalte Fälle';
@@ -34,7 +35,8 @@ $lang->tree->manageCaseChild = 'Verwalte Fälle';
$lang->tree->manageCaselibChild = 'Verwalte Bibliothek';
$lang->tree->manageDashboard = 'Manage Dashboard Module';
$lang->tree->manageDashboardChild = 'Manage Dashboard Child Module';
$lang->tree->manageTaskChild = "Verwalte {$lang->executionCommon}";
$lang->tree->manageProjectChild = "Verwalte {$lang->projectCommon}";
$lang->tree->manageTaskChild = "Verwalte {$lang->execution->common}";
$lang->tree->syncFromProduct = "Copy from Other {$lang->productCommon}s";
$lang->tree->dragAndSort = "Ziehen und Sotieren";
$lang->tree->sort = "Sortieren";

View File

@@ -18,6 +18,7 @@ $lang->tree->browseTask = 'Manage Task Module';
$lang->tree->manage = 'Manage Module';
$lang->tree->fix = 'Fix Module';
$lang->tree->manageProduct = "Manage {$lang->productCommon} Modules";
$lang->tree->manageProject = "Manage {$lang->projectCommon} Modules";
$lang->tree->manageExecution = "Manage {$lang->execution->common} Modules";
$lang->tree->manageLine = "Manage Product Line";
$lang->tree->manageBug = 'Manage Bug';
@@ -34,6 +35,7 @@ $lang->tree->manageCaseChild = 'Manage Child Cases';
$lang->tree->manageCaselibChild = 'Manage Child Libraries';
$lang->tree->manageDashboard = 'Manage Dashboard Module';
$lang->tree->manageDashboardChild = 'Manage Dashboard Child Module';
$lang->tree->manageProjectChild = "Manage Child {$lang->projectCommon} Modules";
$lang->tree->manageTaskChild = "Manage Child {$lang->execution->common} Modules";
$lang->tree->syncFromProduct = "Copy from Other {$lang->productCommon}s";
$lang->tree->dragAndSort = "Drag to order";

View File

@@ -18,7 +18,8 @@ $lang->tree->browseTask = 'Gérer les Modules Tâche';
$lang->tree->manage = 'Gérer les Modules';
$lang->tree->fix = 'Corrigez Module';
$lang->tree->manageProduct = "Gérer les Modules {$lang->productCommon}";
$lang->tree->manageExecution = "Gérer les Modules {$lang->executionCommon}";
$lang->tree->manageProject = "Gérer les Modules {$lang->projectCommon}";
$lang->tree->manageExecution = "Gérer les Modules {$lang->execution->common}";
$lang->tree->manageLine = 'Gérer Ligne Produit';
$lang->tree->manageBug = 'Gérer Bugs';
$lang->tree->manageCase = 'Gérer CasTests';
@@ -34,7 +35,8 @@ $lang->tree->manageCaseChild = 'Gérer Sous-CasTests';
$lang->tree->manageCaselibChild = 'Gérer Sous-Librairies';
$lang->tree->manageDashboard = 'Manage Dashboard Module';
$lang->tree->manageDashboardChild = 'Manage Dashboard Child Module';
$lang->tree->manageTaskChild = "Gérer Sous-Modules {$lang->executionCommon}";
$lang->tree->manageProjectChild = "Gérer Sous-Modules {$lang->projectCommon}";
$lang->tree->manageTaskChild = "Gérer Sous-Modules {$lang->execution->common}";
$lang->tree->syncFromProduct = "Copier d'un autre {$lang->productCommon}";
$lang->tree->dragAndSort = "Faites glisser pour ordonner";
$lang->tree->sort = "Ordonnez";

View File

@@ -18,6 +18,7 @@ $lang->tree->browseTask = '任务模块维护';
$lang->tree->manage = '维护模块';
$lang->tree->fix = '修正数据';
$lang->tree->manageProduct = "维护{$lang->productCommon}视图模块";
$lang->tree->manageProject = "维护{$lang->projectCommon}视图模块";
$lang->tree->manageExecution = "维护{$lang->execution->common}视图模块";
$lang->tree->manageLine = "维护产品线";
$lang->tree->manageBug = '维护测试视图模块';
@@ -34,6 +35,7 @@ $lang->tree->manageCaseChild = '维护用例子模块';
$lang->tree->manageCaselibChild = '维护用例库子模块';
$lang->tree->manageDashboard = '维护仪表盘模块';
$lang->tree->manageDashboardChild = '维护仪表盘子模块';
$lang->tree->manageProjectChild = "维护{$lang->projectCommon}子模块";
$lang->tree->manageTaskChild = "维护{$lang->execution->common}子模块";
$lang->tree->syncFromProduct = '复制模块';
$lang->tree->dragAndSort = "拖放排序";

View File

@@ -44,7 +44,7 @@ li.story-item > .tree-actions .tree-action[data-type=delete] {display: none;}
<form id='childrenForm' method='post' target='hiddenwin' action='<?php echo $this->createLink('tree', 'manageChild', "root={$root->id}&viewType=task");?>'>
<div class='panel'>
<div class='panel-heading'>
<div class='panel-title'><?php echo $lang->tree->manageTaskChild;?></div>
<div class='panel-title'><?php echo $execution->multiple ? $lang->tree->manageTaskChild : $lang->tree->manageProjectChild;?></div>
</div>
<div class='panel-body'>
<table class='table table-form table-auto'>