From db8632234fa40872890a728acb5c6bce370035bb Mon Sep 17 00:00:00 2001 From: daitingting Date: Wed, 18 Jul 2018 17:12:43 +0800 Subject: [PATCH 01/10] * Use html for link in mail, fix bug #1235. --- module/bug/model.php | 2 +- module/bug/view/sendmail.html.php | 2 +- module/story/model.php | 2 +- module/story/view/sendmail.html.php | 2 +- module/task/view/sendmail.html.php | 2 +- module/testtask/view/sendmail.html.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index 9290177b28..99f2b8b319 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2636,7 +2636,7 @@ class bugModel extends model if($id) { $name = $this->dao->select('title')->from(TABLE_BUG)->where('id')->eq($id)->fetch('title'); - if($name) $action->appendLink = html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink($action->objectType, 'view', "id=$id"), "#$id " . $name); + if($name) $action->appendLink = html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink($action->objectType, 'view', "id=$id", 'html'), "#$id " . $name); } } diff --git a/module/bug/view/sendmail.html.php b/module/bug/view/sendmail.html.php index f949c6399e..3c5cddadd0 100644 --- a/module/bug/view/sendmail.html.php +++ b/module/bug/view/sendmail.html.php @@ -18,7 +18,7 @@ color) ? '#333' : $bug->color;?> - config->mail, 'domain', common::getSysURL()) . helper::createLink('bug', 'view', "bugID=$bug->id"), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?> + config->mail, 'domain', common::getSysURL()) . helper::createLink('bug', 'view', "bugID=$bug->id", 'html'), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?> diff --git a/module/story/model.php b/module/story/model.php index bbf8280118..d299d0baa8 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -2506,7 +2506,7 @@ class storyModel extends model if($id) { $name = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($id)->fetch('title'); - if($name) $action->appendLink = html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink($action->objectType, 'view', "id=$id"), "#$id " . $name); + if($name) $action->appendLink = html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink($action->objectType, 'view', "id=$id", 'html'), "#$id " . $name); } } diff --git a/module/story/view/sendmail.html.php b/module/story/view/sendmail.html.php index eaf864d652..bb4c80b87f 100644 --- a/module/story/view/sendmail.html.php +++ b/module/story/view/sendmail.html.php @@ -18,7 +18,7 @@ color) ? '#333' : $story->color;?> - config->mail, 'domain', common::getSysURL()) . helper::createLink('story', 'view', "storyID=$story->id"), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?> + config->mail, 'domain', common::getSysURL()) . helper::createLink('story', 'view', "storyID=$story->id", 'html'), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?> diff --git a/module/task/view/sendmail.html.php b/module/task/view/sendmail.html.php index acdb53ed49..f104d75895 100644 --- a/module/task/view/sendmail.html.php +++ b/module/task/view/sendmail.html.php @@ -18,7 +18,7 @@ color) ? '#333' : $task->color;?> - config->mail, 'domain', common::getSysURL()) . helper::createLink('task', 'view', "taskID=$task->id"), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?> + config->mail, 'domain', common::getSysURL()) . helper::createLink('task', 'view', "taskID=$task->id", 'html'), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?> diff --git a/module/testtask/view/sendmail.html.php b/module/testtask/view/sendmail.html.php index d688899982..492605756e 100644 --- a/module/testtask/view/sendmail.html.php +++ b/module/testtask/view/sendmail.html.php @@ -18,7 +18,7 @@ color) ? '#333' : $testtask->color;?> - config->mail, 'domain', common::getSysURL()) . helper::createLink('testtask', 'view', "testtaskID=$testtask->id"), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?> + config->mail, 'domain', common::getSysURL()) . helper::createLink('testtask', 'view', "testtaskID=$testtask->id", 'html'), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?> From 21480a368aa29b8e65034fe98d26682c4f7ebd03 Mon Sep 17 00:00:00 2001 From: liugang Date: Thu, 19 Jul 2018 13:57:04 +0800 Subject: [PATCH 02/10] * Display empty tips if no data. --- module/report/view/bugassign.html.php | 8 ++++++++ module/report/view/bugcreate.html.php | 8 ++++++++ module/report/view/productsummary.html.php | 8 ++++++++ module/report/view/projectdeviation.html.php | 10 +++++++++- module/report/view/workload.html.php | 8 ++++++++ 5 files changed, 41 insertions(+), 1 deletion(-) diff --git a/module/report/view/bugassign.html.php b/module/report/view/bugassign.html.php index bebaa7056b..d03ac552f7 100644 --- a/module/report/view/bugassign.html.php +++ b/module/report/view/bugassign.html.php @@ -8,6 +8,13 @@ + +
+
+

error->noData;?>

+
+
+
@@ -50,5 +57,6 @@
+ diff --git a/module/report/view/bugcreate.html.php b/module/report/view/bugcreate.html.php index a287c04940..5cadc035e8 100644 --- a/module/report/view/bugcreate.html.php +++ b/module/report/view/bugcreate.html.php @@ -34,6 +34,13 @@ + +
+
+

error->noData;?>

+
+
+
@@ -73,6 +80,7 @@
+ diff --git a/module/report/view/productsummary.html.php b/module/report/view/productsummary.html.php index 3323c3eba0..7167de29a7 100644 --- a/module/report/view/productsummary.html.php +++ b/module/report/view/productsummary.html.php @@ -24,6 +24,13 @@ + +
+
+

error->noData;?>

+
+
+
@@ -95,6 +102,7 @@
+ diff --git a/module/report/view/projectdeviation.html.php b/module/report/view/projectdeviation.html.php index 4d2bb9ccf6..637c403f95 100644 --- a/module/report/view/projectdeviation.html.php +++ b/module/report/view/projectdeviation.html.php @@ -21,6 +21,13 @@ + +
+
+

error->noData;?>

+
+
+
@@ -111,7 +118,8 @@
- + +
30) diff --git a/module/report/view/workload.html.php b/module/report/view/workload.html.php index 6a1c19913e..07afdd1955 100644 --- a/module/report/view/workload.html.php +++ b/module/report/view/workload.html.php @@ -52,6 +52,13 @@
+ +
+
+

error->noData;?>

+
+
+
@@ -105,6 +112,7 @@
+ From 43a295b0082feda992606c13b10c03038e706ac4 Mon Sep 17 00:00:00 2001 From: liugang Date: Thu, 19 Jul 2018 14:11:46 +0800 Subject: [PATCH 03/10] * Fix style. --- module/report/view/bugassign.html.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/module/report/view/bugassign.html.php b/module/report/view/bugassign.html.php index d03ac552f7..622bd59e6f 100644 --- a/module/report/view/bugassign.html.php +++ b/module/report/view/bugassign.html.php @@ -8,14 +8,14 @@ - -
-
-

error->noData;?>

-
-
-
+ +
+
+

error->noData;?>

+
+
+
@@ -56,7 +56,7 @@
+
- From 323e4f80ad89aa9108b0d036b71984ad3e9c63b1 Mon Sep 17 00:00:00 2001 From: daitingting Date: Thu, 19 Jul 2018 15:29:34 +0800 Subject: [PATCH 04/10] * Add space. --- module/bug/view/browse.html.php | 4 ++-- module/product/view/all.html.php | 2 +- module/product/view/build.html.php | 2 +- module/productplan/view/browse.html.php | 2 +- module/project/view/story.html.php | 2 +- module/project/view/storykanban.html.php | 2 +- module/project/view/task.html.php | 2 +- module/testcase/view/browse.html.php | 2 +- module/testsuite/view/library.html.php | 2 +- module/testtask/view/browse.html.php | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 8c2b3e3660..1b66db7390 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -44,7 +44,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow $menuBrowseType = strpos($menuItem->name, 'QUERY') === 0 ? 'bySearch' : $menuItem->name; $label = "{$menuItem->text}"; - $label .= $menuBrowseType == $browseType ? "{$pager->recTotal}" : ''; + $label .= $menuBrowseType == $browseType ? " {$pager->recTotal}" : ''; $active = $menuBrowseType == $browseType ? 'btn-active-text' : ''; if($menuItem->name == 'my') @@ -92,7 +92,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow $moreLabelActive = ''; if(isset($lang->bug->moreSelects[$browseType])) { - $moreLabel = "{$lang->bug->moreSelects[$browseType]}{$pager->recTotal}"; + $moreLabel = "{$lang->bug->moreSelects[$browseType]} {$pager->recTotal}"; $moreLabelActive = 'btn-active-text'; } echo "
{$moreLabel} "; diff --git a/module/product/view/all.html.php b/module/product/view/all.html.php index 512088a330..01a55005ff 100644 --- a/module/product/view/all.html.php +++ b/module/product/view/all.html.php @@ -23,7 +23,7 @@ foreach($lang->product->featureBar['all'] as $key => $label) { $label = "{$label}"; - $label .= $key == $status ? "{$pager->recTotal}" : ''; + $label .= $key == $status ? " {$pager->recTotal}" : ''; $active = $key == $status ? 'btn-active-text' : ''; echo html::a(inlink("all", "productID={$productID}&line=&status={$key}"), $label, '', "class='btn btn-link {$active}' id='{$key}'"); } diff --git a/module/product/view/build.html.php b/module/product/view/build.html.php index 5ccfd7d379..9c77f5a3ed 100644 --- a/module/product/view/build.html.php +++ b/module/product/view/build.html.php @@ -15,7 +15,7 @@ global->flow == 'full'):?> diff --git a/module/productplan/view/browse.html.php b/module/productplan/view/browse.html.php index 2ad8f26266..1688f0fe08 100644 --- a/module/productplan/view/browse.html.php +++ b/module/productplan/view/browse.html.php @@ -18,7 +18,7 @@ moduleName, $this->methodName) as $menuItem):?> hidden)) continue;?> {$menuItem->text}";?> - name == $browseType ? "{$pager->recTotal}" : '';?> + name == $browseType ? " {$pager->recTotal}" : '';?> name == $browseType ? 'btn-active-text' : '';?> inlink('browse', "productID=$productID&branch=$branch&browseType={$menuItem->name}"), $label, '', "class='btn btn-link $active' id='{$menuItem->name}'");?> diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index 48f0d57290..2da8e39b21 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -30,7 +30,7 @@
- createLink('project', 'story', "projectID=$project->id"), "{$lang->story->allStories}{$pager->recTotal}", '', "class='btn btn-link btn-active-text'");?> + createLink('project', 'story', "projectID=$project->id"), "{$lang->story->allStories} {$pager->recTotal}", '', "class='btn btn-link btn-active-text'");?> createLink('project', 'storykanban', "projectID=$project->id"), "{$lang->project->kanban}", '', "class='btn btn-link'");?> product->searchStory;?>
diff --git a/module/project/view/storykanban.html.php b/module/project/view/storykanban.html.php index a3cd405283..d1f2a9654d 100644 --- a/module/project/view/storykanban.html.php +++ b/module/project/view/storykanban.html.php @@ -18,7 +18,7 @@ createLink('project', 'story', "projectID=$project->id"), "{$lang->story->allStories}", '', "class='btn btn-link'");?> - createLink('project', 'storykanban', "projectID=$project->id"), "{$lang->project->kanban}{$total}", '', "class='btn btn-link btn-active-text'");?> + createLink('project', 'storykanban', "projectID=$project->id"), "{$lang->project->kanban} {$total}", '', "class='btn btn-link btn-active-text'");?>
diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php index 5375481754..23a8413547 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -82,7 +82,7 @@ js::set('browseType', $browseType); elseif($menuType != 'status' and $menuType != 'QUERY') { $label = "{$menuItem->text}"; - $label .= $menuType == $browseType ? "{$pager->recTotal}" : ''; + $label .= $menuType == $browseType ? " {$pager->recTotal}" : ''; $active = $menuType == $browseType ? 'btn-active-text' : ''; echo html::a(inlink('task', "project=$projectID&type=$menuType"), $label, '', "id='{$menuType}' class='btn btn-link $active'"); } diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php index fa64a5be98..3439abfe1a 100644 --- a/module/testcase/view/browse.html.php +++ b/module/testcase/view/browse.html.php @@ -216,6 +216,6 @@ js::set('suiteID', $suiteID);
diff --git a/module/testsuite/view/library.html.php b/module/testsuite/view/library.html.php index 4b2b7a14bb..ca1760ceff 100644 --- a/module/testsuite/view/library.html.php +++ b/module/testsuite/view/library.html.php @@ -210,7 +210,7 @@ js::set('flow', $config->global->flow); + From d6291e05e38a82fe08770634b6da7c7c6ed0cbee Mon Sep 17 00:00:00 2001 From: liugang Date: Thu, 19 Jul 2018 15:34:49 +0800 Subject: [PATCH 05/10] * Set project name as header if export stories of a project. --- module/project/view/story.html.php | 2 +- module/story/control.php | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index 48f0d57290..aeedd26bd9 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -36,7 +36,7 @@
" . $lang->story->export, '', "class='btn btn-link export'"); + common::printLink('story', 'export', "productID=$productID&orderBy=id_desc&projectID=$project->id", " " . $lang->story->export, '', "class='btn btn-link export'"); $this->lang->story->create = $this->lang->project->createStory; if($productID and !$this->loadModel('story')->checkForceReview()) diff --git a/module/story/control.php b/module/story/control.php index f00a52c4b0..dae8e6d502 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1353,12 +1353,13 @@ class story extends control /** * get data to export * - * @param int $productID + * @param int $productID * @param string $orderBy + * @param int $projectID * @access public * @return void */ - public function export($productID, $orderBy) + public function export($productID, $orderBy, $projectID = 0) { /* format the fields of every story in order to export data. */ if($_POST) @@ -1551,6 +1552,14 @@ class story extends control } + if($projectID) + { + $header = new stdclass(); + $header->name = 'project'; + $header->tableName = TABLE_PROJECT; + + $this->post->set('header', $header); + } if(!(in_array('platform', $productsType) or in_array('branch', $productsType))) unset($fields['branch']);// If products's type are normal, unset branch field. $this->post->set('fields', $fields); From 6ac385f583220a4375ee3cc97a635bd0e13be7d9 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Mon, 23 Jul 2018 11:25:24 +0800 Subject: [PATCH 06/10] * Finish task #6865. --- module/editor/lang/zh-cn.php | 2 +- module/editor/lang/zh-tw.php | 2 +- module/testreport/lang/zh-cn.php | 2 +- module/testreport/lang/zh-tw.php | 2 +- module/user/lang/zh-cn.php | 2 +- module/user/lang/zh-tw.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/editor/lang/zh-cn.php b/module/editor/lang/zh-cn.php index 9fe3cd7f5b..8f034c31ad 100644 --- a/module/editor/lang/zh-cn.php +++ b/module/editor/lang/zh-cn.php @@ -44,7 +44,7 @@ $lang->editor->translate['model.php'] = 'model'; $lang->editor->modules['action'] = '系统日志'; $lang->editor->modules['admin'] = '后台管理'; $lang->editor->modules['api'] = 'API接口'; -$lang->editor->modules['bug'] = '缺陷管理'; +$lang->editor->modules['bug'] = 'Bug管理'; $lang->editor->modules['build'] = 'Build'; $lang->editor->modules['common'] = '公有模块'; $lang->editor->modules['company'] = '组织视图'; diff --git a/module/editor/lang/zh-tw.php b/module/editor/lang/zh-tw.php index b87cf3e878..692a552ef2 100644 --- a/module/editor/lang/zh-tw.php +++ b/module/editor/lang/zh-tw.php @@ -44,7 +44,7 @@ $lang->editor->translate['model.php'] = 'model'; $lang->editor->modules['action'] = '系統日誌'; $lang->editor->modules['admin'] = '後台管理'; $lang->editor->modules['api'] = 'API介面'; -$lang->editor->modules['bug'] = '缺陷管理'; +$lang->editor->modules['bug'] = 'Bug管理'; $lang->editor->modules['build'] = 'Build'; $lang->editor->modules['common'] = '公有模組'; $lang->editor->modules['company'] = '組織視圖'; diff --git a/module/testreport/lang/zh-cn.php b/module/testreport/lang/zh-cn.php index 7894d57ac9..55b334c8c7 100644 --- a/module/testreport/lang/zh-cn.php +++ b/module/testreport/lang/zh-cn.php @@ -24,7 +24,7 @@ $lang->testreport->bugs = '测试的Bug'; $lang->testreport->builds = '版本信息'; $lang->testreport->goal = '项目目标'; $lang->testreport->cases = '用例'; -$lang->testreport->bugInfo = '缺陷分布'; +$lang->testreport->bugInfo = 'Bug分布'; $lang->testreport->report = '总结'; $lang->testreport->legacyBugs = '遗留的Bug'; $lang->testreport->createdDate = '创建时间'; diff --git a/module/testreport/lang/zh-tw.php b/module/testreport/lang/zh-tw.php index c0355c0dc1..82ce33904f 100644 --- a/module/testreport/lang/zh-tw.php +++ b/module/testreport/lang/zh-tw.php @@ -24,7 +24,7 @@ $lang->testreport->bugs = '測試的Bug'; $lang->testreport->builds = '版本信息'; $lang->testreport->goal = '項目目標'; $lang->testreport->cases = '用例'; -$lang->testreport->bugInfo = '缺陷分佈'; +$lang->testreport->bugInfo = 'Bug分佈'; $lang->testreport->report = '總結'; $lang->testreport->legacyBugs = '遺留的Bug'; $lang->testreport->createdDate = '創建時間'; diff --git a/module/user/lang/zh-cn.php b/module/user/lang/zh-cn.php index 62ce6e2784..c8d852c127 100644 --- a/module/user/lang/zh-cn.php +++ b/module/user/lang/zh-cn.php @@ -72,7 +72,7 @@ $lang->user->search = '搜索'; $lang->user->profile = '档案'; $lang->user->project = $lang->projectCommon; $lang->user->task = '任务'; -$lang->user->bug = '缺陷'; +$lang->user->bug = 'Bug'; $lang->user->test = '测试'; $lang->user->testTask = '测试任务'; $lang->user->testCase = '测试用例'; diff --git a/module/user/lang/zh-tw.php b/module/user/lang/zh-tw.php index bd0bd3584e..5519ad7edb 100644 --- a/module/user/lang/zh-tw.php +++ b/module/user/lang/zh-tw.php @@ -72,7 +72,7 @@ $lang->user->search = '搜索'; $lang->user->profile = '檔案'; $lang->user->project = $lang->projectCommon; $lang->user->task = '任務'; -$lang->user->bug = '缺陷'; +$lang->user->bug = 'Bug'; $lang->user->test = '測試'; $lang->user->testTask = '測試任務'; $lang->user->testCase = '測試用例'; From 1a0046c7a54cd9819b4b7ee0b2e1229a4db2be51 Mon Sep 17 00:00:00 2001 From: reneteng Date: Mon, 23 Jul 2018 11:25:53 +0800 Subject: [PATCH 07/10] * remove support --- module/common/lang/en.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/common/lang/en.php b/module/common/lang/en.php index d8292e1fb5..1146055c8e 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -495,7 +495,7 @@ $lang->noResultsMatch = "No results match!"; $lang->searchMore = "More results:"; $lang->chooseUsersToMail = "Choose users that will be notified."; $lang->browserNotice = 'Your current browser might not show the best effect. Please use Chrome, Firefox, IE9+, Opera or Safari.'; -$lang->noticePasteImg = "Support pasting images here."; +$lang->noticePasteImg = "Paste images here"; /* 时间格式设置。*/ if(!defined('DT_DATETIME1')) define('DT_DATETIME1', 'Y-m-d H:i:s'); From 087cb53536197a3c43b3d4ea48216eb3014633fa Mon Sep 17 00:00:00 2001 From: reneteng Date: Mon, 23 Jul 2018 13:20:47 +0800 Subject: [PATCH 08/10] * change funcion to feature --- module/testcase/lang/en.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testcase/lang/en.php b/module/testcase/lang/en.php index 3a217eecd7..545f8ac6c5 100644 --- a/module/testcase/lang/en.php +++ b/module/testcase/lang/en.php @@ -148,7 +148,7 @@ $lang->testcase->priList[4] = 4; /* Define the types. */ $lang->testcase->typeList[''] = ''; -$lang->testcase->typeList['feature'] = 'Function'; +$lang->testcase->typeList['feature'] = 'Feature'; $lang->testcase->typeList['performance'] = 'Performance'; $lang->testcase->typeList['config'] = 'Config'; $lang->testcase->typeList['install'] = 'Install'; From 1eaaf24db6b6114dab097dd9f7cbb4b1c6decd96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=94=E5=93=A5?= Date: Mon, 23 Jul 2018 13:30:15 +0800 Subject: [PATCH 09/10] * Change for Xuanxuan entry sso. --- config/filter.php | 3 ++- module/sso/control.php | 37 +++++++++++++++++++++---------------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/config/filter.php b/config/filter.php index e173dd69be..a5db047a7f 100644 --- a/config/filter.php +++ b/config/filter.php @@ -13,7 +13,7 @@ $filter->rules->word = '/^\w+$/'; $filter->rules->paramName = '/^[a-zA-Z0-9_\.]+$/'; $filter->rules->paramValue = '/^[a-zA-Z0-9=_,`#+\^\/\.%\|\x7f-\xff]+$/'; -$filter->default = new stdclass(); +$filter->default = new stdclass(); $filter->default->moduleName = 'code'; $filter->default->methodName = 'code'; $filter->default->paramName = 'reg::paramName'; @@ -194,6 +194,7 @@ $filter->sso->login->get['md5'] = 'reg::md5'; $filter->sso->login->get['referer'] = 'reg::base64'; $filter->sso->login->get['status'] = 'code'; $filter->sso->login->get['token'] = 'reg::md5'; +$filter->sso->login->get['sessionid'] = 'reg::base64'; $filter->sso->logout->get['status'] = 'code'; $filter->sso->logout->get['token'] = 'reg::md5'; diff --git a/module/sso/control.php b/module/sso/control.php index e2eee29823..bf89541177 100644 --- a/module/sso/control.php +++ b/module/sso/control.php @@ -13,8 +13,8 @@ class sso extends control { /** * SSO login. - * - * @param string $type + * + * @param string $type * @access public * @return void */ @@ -44,6 +44,11 @@ class sso extends control { $location = rtrim($location, '?') . "?token=$token&auth=$auth&userIP=$userIP&callback=$callback&referer=$referer"; } + if(!empty($_GET['sessionid'])) + { + $sessionConfig = json_decode(base64_decode($this->get->sessionid), false); + $location .= '&' . $sessionConfig->session_name . '=' . $sessionConfig->session_id; + } $this->locate($location); } @@ -95,8 +100,8 @@ class sso extends control /** * SSO logout. - * - * @param string $type + * + * @param string $type * @access public * @return void */ @@ -115,9 +120,9 @@ class sso extends control if(strpos($location, '&') !== false) { $location = rtrim($location, '&') . "&token=$token&auth=$auth&userIP=$userIP&callback=$callback"; - } + } else - { + { $location = rtrim($location, '?') . "?token=$token&auth=$auth&userIP=$userIP&callback=$callback"; } $this->locate($location); @@ -135,7 +140,7 @@ class sso extends control /** * Ajax set config. - * + * * @access public * @return void */ @@ -158,9 +163,9 @@ class sso extends control } /** - * Bind user. - * - * @param string $referer + * Bind user. + * + * @param string $referer * @access public * @return void */ @@ -199,7 +204,7 @@ class sso extends control /** * Get pairs of user. - * + * * @access public * @return void */ @@ -212,7 +217,7 @@ class sso extends control /** * Get bind users with ranzhi. - * + * * @access public * @return void */ @@ -225,7 +230,7 @@ class sso extends control /** * Bind user from ranzhi. - * + * * @access public * @return void */ @@ -242,7 +247,7 @@ class sso extends control /** * Create user from ranzhi. - * + * * @access public * @return void */ @@ -258,8 +263,8 @@ class sso extends control /** * Get todo list for ranzhi. - * - * @param string $account + * + * @param string $account * @access public * @return void */ From a2baa7ad5ae1b1377f1069e9250cc2c6340bee3f Mon Sep 17 00:00:00 2001 From: liugang Date: Mon, 23 Jul 2018 14:15:04 +0800 Subject: [PATCH 10/10] * Display chart datas of testtask. --- module/testreport/control.php | 31 +++++++++++++ .../testreport/view/blockbugreport.html.php | 46 +++++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/module/testreport/control.php b/module/testreport/control.php index f42f97fc9a..a374571706 100644 --- a/module/testreport/control.php +++ b/module/testreport/control.php @@ -158,6 +158,8 @@ class testreport extends control $tasks = array($task->id => $task); $owner = $task->owner; + $this->setChartDatas($objectID); + $this->view->title = $task->name . $this->lang->testreport->create; $this->view->position[] = html::a(inlink('browse', "objectID=$productID&objectType=product&extra={$task->id}"), $task->name); $this->view->position[] = $this->lang->testreport->create; @@ -306,6 +308,8 @@ class testreport extends control $bugs = $this->testreport->getBugs4Test($builds, $report->product, $report->begin, $report->end); } $tasks = array($task->id => $task); + + $this->setChartDatas($report->objectID); } else { @@ -390,6 +394,8 @@ class testreport extends control $cases = $this->testreport->getTaskCases($tasks, $report->cases); $bugInfo = $this->testreport->getBugInfo($tasks, $report->product, $report->begin, $report->end, $builds); + if($report->objectType == 'testtask') $this->setChartDatas($report->objectID); + $this->view->title = $report->title; $this->view->browseLink = $browseLink; $this->view->position[] = $report->title; @@ -461,4 +467,29 @@ class testreport extends control return $projectID; } } + + /** + * Set chart datas of cases. + * + * @param int $taskID + * @access public + * @return void + */ + public function setChartDatas($taskID) + { + $this->loadModel('report'); + $task = $this->loadModel('testtask')->getById($taskID); + foreach($this->lang->testtask->report->charts as $chart => $title) + { + if(strpos($chart, 'testTask') === false) continue; + + $chartFunc = 'getDataOf' . $chart; + $chartData = $this->testtask->$chartFunc($taskID); + $chartOption = $this->testtask->mergeChartOption($chart); + if(!empty($chartType)) $chartOption->type = $chartType; + + $this->view->charts[$chart] = $chartOption; + $this->view->datas[$chart] = $this->report->computePercent($chartData); + } + } } diff --git a/module/testreport/view/blockbugreport.html.php b/module/testreport/view/blockbugreport.html.php index c5acb1ac11..232a061728 100644 --- a/module/testreport/view/blockbugreport.html.php +++ b/module/testreport/view/blockbugreport.html.php @@ -1,4 +1,50 @@ + $chartOption):?> + + + + $infoValue):?>
+ + + + + + + + + + + +
+
testtask->report->charts[$chartType];?>
+ testreport->none;?> +
+
+
testtask->report->charts[$chartType];?>
+
+
+
+
+ + + + + + + + + $data):?> + + + + + + + +
report->item;?>report->value;?>report->percent;?>
name;?>value;?>percent * 100) . '%';?>
+
+
+