From d53140f21c5d346189d564864f2b262414fcc5cb Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Wed, 7 Apr 2021 16:20:20 +0800 Subject: [PATCH 1/5] * Fix an error. --- module/doc/lang/de.php | 14 +++++++------- module/doc/lang/en.php | 14 +++++++------- module/doc/lang/fr.php | 14 +++++++------- module/doc/lang/vi.php | 4 ++-- module/doc/lang/zh-cn.php | 14 +++++++------- module/doc/lang/zh-tw.php | 14 +++++++------- 6 files changed, 37 insertions(+), 37 deletions(-) diff --git a/module/doc/lang/de.php b/module/doc/lang/de.php index cb9b85d325..35087ff727 100644 --- a/module/doc/lang/de.php +++ b/module/doc/lang/de.php @@ -183,13 +183,13 @@ $lang->doc->noOpenedDoc = 'Sie haben kein Dokument erstellt.'; $lang->doc->noCollectedDoc = 'Sie haben kein Dokument gesammelt.'; $lang->doc->errorEmptyLib = 'No data in document library.'; -$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product can access it.'; -$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist can access it.'; -$lang->doc->noticeAcl['lib']['execution']['default'] = 'Users who can access the selected execution can access it.'; -$lang->doc->noticeAcl['lib']['execution']['custom'] = 'Users who can access the selected execution or users in the whiltelist can access it.'; -$lang->doc->noticeAcl['lib']['custom']['open'] = 'All users can access it.'; -$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist can access it.'; -$lang->doc->noticeAcl['lib']['custom']['private'] = 'Only the one who created it can access it.'; +$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product can access it.'; +$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist can access it.'; +$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project can access it.'; +$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist can access it.'; +$lang->doc->noticeAcl['lib']['custom']['open'] = 'All users can access it.'; +$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist can access it.'; +$lang->doc->noticeAcl['lib']['custom']['private'] = 'Only the one who created it can access it.'; $lang->doc->noticeAcl['doc']['open'] = 'Users who can access the document library which the document belongs can access it.'; $lang->doc->noticeAcl['doc']['custom'] = 'Users in the whiltelist can access it.'; diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index a1cf4294c5..8b7d745b78 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -187,13 +187,13 @@ $lang->doc->noOpenedDoc = 'You have not created any documents.'; $lang->doc->noCollectedDoc = 'You have not favorited any documents.'; $lang->doc->errorEmptyLib = 'No data in document library.'; -$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product can access it.'; -$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist can access it.'; -$lang->doc->noticeAcl['lib']['execution']['default'] = 'Users who can access the selected execution can access it.'; -$lang->doc->noticeAcl['lib']['execution']['custom'] = 'Users who can access the selected execution or users in the whiltelist can access it.'; -$lang->doc->noticeAcl['lib']['custom']['open'] = 'All users can access it.'; -$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist can access it.'; -$lang->doc->noticeAcl['lib']['custom']['private'] = 'Only the one who created it can access it.'; +$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product can access it.'; +$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist can access it.'; +$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project can access it.'; +$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist can access it.'; +$lang->doc->noticeAcl['lib']['custom']['open'] = 'All users can access it.'; +$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist can access it.'; +$lang->doc->noticeAcl['lib']['custom']['private'] = 'Only the one who created it can access it.'; $lang->doc->noticeAcl['doc']['open'] = 'Users who can access the document library which the document belongs can access it.'; $lang->doc->noticeAcl['doc']['custom'] = 'Users in the whiltelist can access it.'; diff --git a/module/doc/lang/fr.php b/module/doc/lang/fr.php index 97cc1f68c0..9905f9d826 100644 --- a/module/doc/lang/fr.php +++ b/module/doc/lang/fr.php @@ -183,13 +183,13 @@ $lang->doc->noOpenedDoc = "Vous n'avez pas ajouté de documents."; $lang->doc->noCollectedDoc = "Vous avez aucun document dans vos favoris."; $lang->doc->errorEmptyLib = 'No data in document library.'; -$lang->doc->noticeAcl['lib']['product']['default'] = 'Les utilisateurs qui ont accès au Product peuvent y accéder.'; -$lang->doc->noticeAcl['lib']['product']['custom'] = 'Les utilisateurs qui ont accès au Product ou les utilisateurs de la Liste Blanche peuvent y accéder.'; -$lang->doc->noticeAcl['lib']['execution']['default'] = 'Les utilisateurs qui ont accès au Projet peuvent y accéder.'; -$lang->doc->noticeAcl['lib']['execution']['custom'] = 'Les utilisateurs qui ont accès au Projet ou les utilisateurs de la Liste Blanche peuvent y accéder.'; -$lang->doc->noticeAcl['lib']['custom']['open'] = 'Tous les utilisateurs peuvent y accéder.'; -$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Les utilisateurs de la Liste Blanche peuvent y accéder.'; -$lang->doc->noticeAcl['lib']['custom']['private'] = 'Seulement le créateur de la Bibliothèque peut y accéder.'; +$lang->doc->noticeAcl['lib']['product']['default'] = 'Les utilisateurs qui ont accès au Product peuvent y accéder.'; +$lang->doc->noticeAcl['lib']['product']['custom'] = 'Les utilisateurs qui ont accès au Product ou les utilisateurs de la Liste Blanche peuvent y accéder.'; +$lang->doc->noticeAcl['lib']['project']['default'] = 'Les utilisateurs qui ont accès au Projet peuvent y accéder.'; +$lang->doc->noticeAcl['lib']['project']['custom'] = 'Les utilisateurs qui ont accès au Projet ou les utilisateurs de la Liste Blanche peuvent y accéder.'; +$lang->doc->noticeAcl['lib']['custom']['open'] = 'Tous les utilisateurs peuvent y accéder.'; +$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Les utilisateurs de la Liste Blanche peuvent y accéder.'; +$lang->doc->noticeAcl['lib']['custom']['private'] = 'Seulement le créateur de la Bibliothèque peut y accéder.'; $lang->doc->noticeAcl['doc']['open'] = 'Les utilisateurs qui ont accès à la Bibliothèque à laquelle le document appartient peuvent y accéder.'; $lang->doc->noticeAcl['doc']['custom'] = 'Les utilisateurs de la Liste Blanche peuvent y accéder.'; diff --git a/module/doc/lang/vi.php b/module/doc/lang/vi.php index 0e46cd2b46..2cda874937 100644 --- a/module/doc/lang/vi.php +++ b/module/doc/lang/vi.php @@ -185,8 +185,8 @@ $lang->doc->errorEmptyLib = 'No data in document library.'; $lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product có thể truy cập nó.'; $lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist có thể truy cập nó.'; -$lang->doc->noticeAcl['lib']['execution']['default'] = 'Users who can access the selected execution có thể truy cập nó.'; -$lang->doc->noticeAcl['lib']['execution']['custom'] = 'Users who can access the selected execution or users in the whiltelist có thể truy cập nó.'; +$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project có thể truy cập nó.'; +$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist có thể truy cập nó.'; $lang->doc->noticeAcl['lib']['custom']['open'] = 'Tất cả users có thể truy cập nó.'; $lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist có thể truy cập nó.'; $lang->doc->noticeAcl['lib']['custom']['private'] = 'Chỉ the one who created it có thể truy cập nó.'; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index 8e48737b0d..d60d3ec3f0 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -187,13 +187,13 @@ $lang->doc->noOpenedDoc = '您还没有创建任何文档。'; $lang->doc->noCollectedDoc = '您还没有收藏任何文档。'; $lang->doc->errorEmptyLib = '文档库暂无数据。'; -$lang->doc->noticeAcl['lib']['product']['default'] = '有所选产品访问权限的用户可以访问。'; -$lang->doc->noticeAcl['lib']['product']['custom'] = '有所选产品访问权限或白名单里的用户可以访问。'; -$lang->doc->noticeAcl['lib']['execution']['default'] = "有所选{$lang->executionCommon}访问权限的用户可以访问。"; -$lang->doc->noticeAcl['lib']['execution']['custom'] = "有所选{$lang->executionCommon}访问权限或白名单里的用户可以访问。"; -$lang->doc->noticeAcl['lib']['custom']['open'] = '所有人都可以访问。'; -$lang->doc->noticeAcl['lib']['custom']['custom'] = '白名单的用户可以访问。'; -$lang->doc->noticeAcl['lib']['custom']['private'] = '只有创建者自己可以访问。'; +$lang->doc->noticeAcl['lib']['product']['default'] = '有所选产品访问权限的用户可以访问。'; +$lang->doc->noticeAcl['lib']['product']['custom'] = '有所选产品访问权限或白名单里的用户可以访问。'; +$lang->doc->noticeAcl['lib']['project']['default'] = "有所选项目访问权限的用户可以访问。"; +$lang->doc->noticeAcl['lib']['project']['custom'] = "有所选项目访问权限或白名单里的用户可以访问。"; +$lang->doc->noticeAcl['lib']['custom']['open'] = '所有人都可以访问。'; +$lang->doc->noticeAcl['lib']['custom']['custom'] = '白名单的用户可以访问。'; +$lang->doc->noticeAcl['lib']['custom']['private'] = '只有创建者自己可以访问。'; $lang->doc->noticeAcl['doc']['open'] = '有文档所属文档库访问权限的,都可以访问。'; $lang->doc->noticeAcl['doc']['custom'] = '白名单的用户可以访问。'; diff --git a/module/doc/lang/zh-tw.php b/module/doc/lang/zh-tw.php index b9922cc6d0..0edc7c7ba0 100644 --- a/module/doc/lang/zh-tw.php +++ b/module/doc/lang/zh-tw.php @@ -182,13 +182,13 @@ $lang->doc->noOpenedDoc = '您還沒有創建任何文檔。'; $lang->doc->noCollectedDoc = '您還沒有收藏任何文檔。'; $lang->doc->errorEmptyLib = '文檔庫暫無數據。'; -$lang->doc->noticeAcl['lib']['product']['default'] = '有所選產品訪問權限的用戶可以訪問。'; -$lang->doc->noticeAcl['lib']['product']['custom'] = '有所選產品訪問權限或白名單裡的用戶可以訪問。'; -$lang->doc->noticeAcl['lib']['execution']['default'] = "有所選{$lang->executionCommon}訪問權限的用戶可以訪問。"; -$lang->doc->noticeAcl['lib']['execution']['custom'] = "有所選{$lang->executionCommon}訪問權限或白名單裡的用戶可以訪問。"; -$lang->doc->noticeAcl['lib']['custom']['open'] = '所有人都可以訪問。'; -$lang->doc->noticeAcl['lib']['custom']['custom'] = '白名單的用戶可以訪問。'; -$lang->doc->noticeAcl['lib']['custom']['private'] = '只有創建者自己可以訪問。'; +$lang->doc->noticeAcl['lib']['product']['default'] = '有所選產品訪問權限的用戶可以訪問。'; +$lang->doc->noticeAcl['lib']['product']['custom'] = '有所選產品訪問權限或白名單裡的用戶可以訪問。'; +$lang->doc->noticeAcl['lib']['project']['default'] = "有所選項目訪問權限的用戶可以訪問。"; +$lang->doc->noticeAcl['lib']['project']['custom'] = "有所選項目訪問權限或白名單裡的用戶可以訪問。"; +$lang->doc->noticeAcl['lib']['custom']['open'] = '所有人都可以訪問。'; +$lang->doc->noticeAcl['lib']['custom']['custom'] = '白名單的用戶可以訪問。'; +$lang->doc->noticeAcl['lib']['custom']['private'] = '只有創建者自己可以訪問。'; $lang->doc->noticeAcl['doc']['open'] = '有文檔所屬文檔庫訪問權限的,都可以訪問。'; $lang->doc->noticeAcl['doc']['custom'] = '白名單的用戶可以訪問。'; From d0aeb07ac2f46f19e811202a630611bb0ce03508 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Wed, 7 Apr 2021 16:33:03 +0800 Subject: [PATCH 2/5] * Fix bug #11869. --- module/bug/control.php | 2 +- module/bug/js/common.js | 13 ++++++++++--- module/bug/view/create.html.php | 13 ++++++++++++- module/bug/view/edit.html.php | 1 + 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 8f1d5148fd..d79aaa14b5 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -542,7 +542,7 @@ class bug extends control /* Get executions. */ $executions = array('' => ''); - if(isset($projects[$projectID])) $executions += $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID); + if(isset($projects[$projectID]) or $this->config->systemMode == 'classic') $executions += $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID); /* Set custom. */ foreach(explode(',', $this->config->bug->list->customCreateFields) as $field) $customFields[$field] = $this->lang->bug->$field; diff --git a/module/bug/js/common.js b/module/bug/js/common.js index 26329670a7..301322c8e3 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -2,6 +2,7 @@ $(function() { var page = window.page || ''; var flow = window.flow; + if(typeof(systemMode) == undefined) var systemMode = ''; $('#subNavbar a[data-toggle=dropdown]').parent().addClass('dropdown dropdown-hover'); @@ -240,6 +241,12 @@ function loadProductStories(productID) */ function loadProductProjects(productID) { + if(systemMode == 'classic') + { + loadProductExecutions(productID); + return true; + } + branch = $('#branch').val(); if(typeof(branch) == 'undefined') branch = 0; @@ -262,8 +269,8 @@ function loadProductProjects(productID) */ function loadProductExecutions(productID, projectID = 0) { - if(!projectID) projectID = $('#project').find("option:selected").val(); - if(!projectID) productID = 0; + if(!projectID && systemMode != 'classic') projectID = $('#project').find("option:selected").val(); + if(!projectID && systemMode != 'classic') productID = 0; required = $('#execution_chosen').hasClass('required'); branch = $('#branch').val(); if(typeof(branch) == 'undefined') branch = 0; @@ -272,7 +279,7 @@ function loadProductExecutions(productID, projectID = 0) $('#executionIdBox').load(link, function() { $(this).find('select').chosen(); - if(typeof(bugExecution) == 'string') $('#executionIdBox').prepend("" + bugExecution + ""); + if(typeof(bugExecution) == 'string' && systemMode != 'classic') $('#executionIdBox').prepend("" + bugExecution + ""); if(required) $(this).addClass('required'); }); } diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index 23c9d36510..66253714df 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -73,7 +73,10 @@ js::set('blockID', $blockID);