From 054ee87fa86f785fdb22e61eb024eddef910268f Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Thu, 16 Jul 2020 17:17:36 -0700 Subject: [PATCH 1/6] =?UTF-8?q?*=20Fix=20jenkins=20exec=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/ci/model.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/module/ci/model.php b/module/ci/model.php index 99bb5da5da..444404042d 100644 --- a/module/ci/model.php +++ b/module/ci/model.php @@ -84,9 +84,7 @@ class ciModel extends model $queueInfo = json_decode($response); if(!empty($queueInfo->executable)) { - $buildUrl = $queueInfo->executable->url . 'api/json?pretty=true'; - $buildUrl = str_replace('://', $jenkinsAuth, $buildUrl); - + $buildUrl = $queueInfo->executable->url . 'api/json?pretty=true'; $response = common::http($buildUrl, '', false, $userPwd); $buildInfo = json_decode($response); @@ -100,7 +98,6 @@ class ciModel extends model $this->updateBuildStatus($compile, $result); $logUrl = $buildInfo->url . 'logText/progressiveText/api/json'; - $logUrl = str_replace('://', $jenkinsAuth, $logUrl); $response = common::http($logUrl, '', false, $userPwd); $this->dao->update(TABLE_COMPILE)->set('logs')->eq($response)->where('id')->eq($compile->id)->exec(); } From a9dcdea00d6bb99e0a47b316d9e94d42f6ae1420 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Fri, 17 Jul 2020 08:58:18 +0800 Subject: [PATCH 2/6] * Finish task #7472. --- module/bug/control.php | 2 +- module/task/control.php | 2 +- module/testcase/control.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 90b51ebd5f..a27b5ff705 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -638,7 +638,7 @@ class bug extends control } if($this->post->comment != '' or !empty($changes) or !empty($files)) { - $action = !empty($changes) ? 'Edited' : 'Commented'; + $action = (!empty($changes) or !empty($files)) ? 'Edited' : 'Commented'; $fileAction = ''; if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n" ; $actionID = $this->action->create('bug', $bugID, $action, $fileAction . $this->post->comment); diff --git a/module/task/control.php b/module/task/control.php index c36105d754..85875fb4a6 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -330,7 +330,7 @@ class task extends control $task = $this->task->getById($taskID); if($this->post->comment != '' or !empty($changes) or !empty($files)) { - $action = !empty($changes) ? 'Edited' : 'Commented'; + $action = (!empty($changes) or !empty($files)) ? 'Edited' : 'Commented'; $fileAction = !empty($files) ? $this->lang->addFiles . join(',', $files) . "\n" : ''; $actionID = $this->action->create('task', $taskID, $action, $fileAction . $this->post->comment); if(!empty($changes)) $this->action->logHistory($actionID, $changes); diff --git a/module/testcase/control.php b/module/testcase/control.php index 47bb7ff715..eabaddeacc 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -590,7 +590,7 @@ class testcase extends control if($this->post->comment != '' or !empty($changes) or !empty($files)) { $this->loadModel('action'); - $action = !empty($changes) ? 'Edited' : 'Commented'; + $action = (!empty($changes) or !empty($files)) ? 'Edited' : 'Commented'; $fileAction = ''; if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n"; $actionID = $this->action->create('case', $caseID, $action, $fileAction . $this->post->comment); From 3b33a3cb1f029b53d0fd4bde691db4c05141b2c6 Mon Sep 17 00:00:00 2001 From: sgm0422 <976204163@qq.com> Date: Fri, 17 Jul 2020 09:05:21 +0800 Subject: [PATCH 3/6] * Fix my setMenu bug. --- module/my/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/my/model.php b/module/my/model.php index 9acf709374..6808ab9adc 100644 --- a/module/my/model.php +++ b/module/my/model.php @@ -32,7 +32,7 @@ class myModel extends model { unset($this->lang->my->menuOrder[15]); $this->lang->my->menuOrder[32] = 'task'; - $this->lang->my->dividerMenu = str_replace(',task,', ',' , $this->lang->my->menuOrder[20] . ',', $this->lang->my->dividerMenu); + $this->lang->my->dividerMenu = str_replace(',task,', ',' . $this->lang->my->menuOrder[20] . ',', $this->lang->my->dividerMenu); } elseif($role == 'po') { From 2455413bba045be8e0ebf5bd84bf68791deaabf3 Mon Sep 17 00:00:00 2001 From: sgm0422 <976204163@qq.com> Date: Fri, 17 Jul 2020 09:21:47 +0800 Subject: [PATCH 4/6] * Finish task #7485. --- db/update12.3.3.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 db/update12.3.3.sql diff --git a/db/update12.3.3.sql b/db/update12.3.3.sql new file mode 100644 index 0000000000..3a21df8a26 --- /dev/null +++ b/db/update12.3.3.sql @@ -0,0 +1 @@ +ALTER TABLE `zt_doccontent` CHANGE `content` `content` longtext NOT NULL AFTER `digest`; From 9ebffe1e6e3f606c47d1294eed452aa6593e9561 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Fri, 17 Jul 2020 00:08:24 -0700 Subject: [PATCH 5/6] * Fix jenkins bug. --- module/jenkins/view/browse.html.php | 2 +- module/job/model.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/jenkins/view/browse.html.php b/module/jenkins/view/browse.html.php index fdc58858e9..4e3fcf9011 100644 --- a/module/jenkins/view/browse.html.php +++ b/module/jenkins/view/browse.html.php @@ -32,7 +32,7 @@ createLink('jenkins', 'delete', "jenkinsID=$id"), '', '', "title='{$lang->jenkins->delete}' class='btn'"); + if(common::hasPriv('jenkins', 'delete')) echo html::a($this->createLink('jenkins', 'delete', "jenkinsID=$id"), '', 'hiddenwin', "title='{$lang->jenkins->delete}' class='btn'"); ?> diff --git a/module/job/model.php b/module/job/model.php index 76f7756c80..16dda48fdd 100644 --- a/module/job/model.php +++ b/module/job/model.php @@ -172,6 +172,7 @@ class jobModel extends model */ public function initJob($id, $job, $repoType) { + if(empty($id)) return false; if($job->triggerType == 'schedule' and strpos($job->atDay, date('w')) !== false) { $compiles = $this->dao->select('*')->from(TABLE_COMPILE)->where('job')->eq($id)->andWhere('LEFT(createdDate, 10)')->eq(date('Y-m-d'))->fetchAll(); From 7768b040d4a1844a59dbf028e6ba3221009dbf90 Mon Sep 17 00:00:00 2001 From: chenfei Date: Fri, 17 Jul 2020 16:39:49 +0800 Subject: [PATCH 6/6] * Finish task #7383. --- config/zentaopms.php | 3 +++ module/common/lang/de.php | 1 - module/common/lang/en.php | 1 - module/common/lang/fr.php | 1 - module/common/lang/vi.php | 1 - module/common/lang/zh-cn.php | 1 - module/common/lang/zh-tw.php | 1 - module/common/model.php | 5 ++++- 8 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/zentaopms.php b/config/zentaopms.php index 476ae5d778..1b94bfc23c 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -113,6 +113,9 @@ $config->hourPointCommonList['vi'][0] = 'giờ'; $config->hourPointCommonList['vi'][1] = 'điểm'; $config->hourPointCommonList['vi'][2] = 'function point'; +$config->manualUrl['home'] = 'https://www.zentao.net/book/zentaopmshelp.html?fullScreen=zentao'; +$config->manualUrl['int'] = 'https://www.zentao.pm/book/zentaomanual/zentao-installation-11.html?fullScreen=zentao'; + /* Supported charsets. */ $config->charsets['zh-cn']['utf-8'] = 'UTF-8'; $config->charsets['zh-cn']['gbk'] = 'GBK'; diff --git a/module/common/lang/de.php b/module/common/lang/de.php index 04a8f57fd9..40f4af6fe9 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -86,7 +86,6 @@ $lang->homepage = 'Als Startseite setzen'; $lang->noviceTutorial = 'Anleitung'; $lang->changeLog = 'Änderungsprotokoll'; $lang->manual = 'Handbuch'; -$lang->manualUrl = 'http://www.zentao.net/book/zentaopmshelp.html?fullScreen=zentao'; $lang->customMenu = 'Benutzer Menü'; $lang->customField = 'Individualfeld'; $lang->lineNumber = 'Zeile Nr.'; diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 86bac80496..81d53ed0df 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -86,7 +86,6 @@ $lang->homepage = 'Set Home'; $lang->noviceTutorial = 'ZenTao Tutorial'; $lang->changeLog = 'Change Log'; $lang->manual = 'User Manual'; -$lang->manualUrl = 'https://www.zentao.pm/book/zentaomanual/zentao-installation-11.html'; $lang->customMenu = 'Custom Menu'; $lang->customField = 'Custom Field'; $lang->lineNumber = 'Line No.'; diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php index ca726018f9..7dfdacd0e3 100644 --- a/module/common/lang/fr.php +++ b/module/common/lang/fr.php @@ -86,7 +86,6 @@ $lang->homepage = 'Set Home'; $lang->noviceTutorial = 'Tutoriel ZenTao'; $lang->changeLog = 'Change Log'; $lang->manual = 'User Manual'; -$lang->manualUrl = 'https://www.zentao.pm/book/zentaomanual/zentao-installation-11.html'; $lang->customMenu = 'Personnalisation Menu'; $lang->customField = 'Personnalisation Champ'; $lang->lineNumber = 'Ligne No.'; diff --git a/module/common/lang/vi.php b/module/common/lang/vi.php index 443f355ece..60cf0134d8 100644 --- a/module/common/lang/vi.php +++ b/module/common/lang/vi.php @@ -86,7 +86,6 @@ $lang->homepage = 'Trang thiết lập'; $lang->noviceTutorial = 'Hướng dẫn ZenTao'; $lang->changeLog = 'Thay đổi nhật ký'; $lang->manual = 'Hướng dẫn người dùng'; -$lang->manualUrl = 'https://www.zentao.pm/book/zentaomanual/zentao-installation-11.html'; $lang->customMenu = 'Tùy biến Menu'; $lang->customField = 'Tùy biến trường'; $lang->lineNumber = 'Số dòng'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 7acc235484..0e188fcdf1 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -86,7 +86,6 @@ $lang->homepage = '设为模块首页'; $lang->noviceTutorial = '新手教程'; $lang->changeLog = '修改日志'; $lang->manual = '手册'; -$lang->manualUrl = 'https://www.zentao.net/book/zentaopmshelp.html?fullScreen=zentao'; $lang->customMenu = '自定义导航'; $lang->customField = '自定义表单项'; $lang->lineNumber = '行号'; diff --git a/module/common/lang/zh-tw.php b/module/common/lang/zh-tw.php index 1599e01c53..393185028a 100644 --- a/module/common/lang/zh-tw.php +++ b/module/common/lang/zh-tw.php @@ -86,7 +86,6 @@ $lang->homepage = '設為模組首頁'; $lang->noviceTutorial = '新手教程'; $lang->changeLog = '修改日誌'; $lang->manual = '手冊'; -$lang->manualUrl = 'https://www.zentao.net/book/zentaopmshelp.html?fullScreen=zentao'; $lang->customMenu = '自定義導航'; $lang->customField = '自定義表單項'; $lang->lineNumber = '行號'; diff --git a/module/common/model.php b/module/common/model.php index 440a851fea..e67ab4a9b0 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -325,7 +325,10 @@ class commonModel extends model echo "" . $lang->help . ""; echo "\n"; echo '
  • ' . html::a(helper::createLink('misc', 'about'), $lang->aboutZenTao, '', "class='about iframe' data-width='1050' data-headerless='true' data-backdrop='true' data-keyboard='true' data-class='modal-about'") . '
  • ';