From 6c6e84c52d7a8795d04d20d4e56fcec0de388f31 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 7 Nov 2018 11:58:40 +0800 Subject: [PATCH] * finish task #5061. --- module/bug/control.php | 6 +++--- module/product/control.php | 6 +++--- module/project/control.php | 16 ++++++++-------- module/testcase/control.php | 6 +++--- module/testsuite/control.php | 4 ++-- module/testtask/control.php | 4 ++-- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 47a8720a61..bc2d817199 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -82,9 +82,9 @@ class bug extends control if($this->cookie->preProductID != $productID or $this->cookie->preBranch != $branch) { $_COOKIE['bugModule'] = 0; - setcookie('bugModule', 0, $this->config->cookieLife, $this->config->webRoot); + setcookie('bugModule', 0, 0, $this->config->webRoot); } - if($browseType == 'bymodule') setcookie('bugModule', (int)$param, $this->config->cookieLife, $this->config->webRoot); + if($browseType == 'bymodule') setcookie('bugModule', (int)$param, 0, $this->config->webRoot); if($browseType != 'bymodule') $this->session->set('bugBrowseType', $browseType); $moduleID = ($browseType == 'bymodule') ? (int)$param : ($browseType == 'bysearch' ? 0 : ($this->cookie->bugModule ? $this->cookie->bugModule : 0)); @@ -96,7 +96,7 @@ class bug extends control /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->qaBugOrder ? $this->cookie->qaBugOrder : 'id_desc'; - setcookie('qaBugOrder', $orderBy, $this->config->cookieLife, $this->config->webRoot); + setcookie('qaBugOrder', $orderBy, 0, $this->config->webRoot); /* Append id for secend sort. */ $sort = $this->loadModel('common')->appendOrder($orderBy); diff --git a/module/product/control.php b/module/product/control.php index 71254d6941..12be4841fd 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -118,9 +118,9 @@ class product extends control if($this->cookie->preProductID != $productID or $this->cookie->preBranch != $branch) { $_COOKIE['storyModule'] = 0; - setcookie('storyModule', 0, $this->config->cookieLife, $this->config->webRoot); + setcookie('storyModule', 0, 0, $this->config->webRoot); } - if($browseType == 'bymodule') setcookie('storyModule', (int)$param, $this->config->cookieLife, $this->config->webRoot); + if($browseType == 'bymodule') setcookie('storyModule', (int)$param, 0, $this->config->webRoot); if($browseType != 'bymodule') $this->session->set('storyBrowseType', $browseType); $moduleID = ($browseType == 'bymodule') ? (int)$param : ($browseType == 'bysearch' ? 0 : ($this->cookie->storyModule ? $this->cookie->storyModule : 0)); @@ -131,7 +131,7 @@ class product extends control /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->productStoryOrder ? $this->cookie->productStoryOrder : 'id_desc'; - setcookie('productStoryOrder', $orderBy, $this->config->cookieLife, $this->config->webRoot); + setcookie('productStoryOrder', $orderBy, 0, $this->config->webRoot); /* Append id for secend sort. */ $sort = $this->loadModel('common')->appendOrder($orderBy); diff --git a/module/project/control.php b/module/project/control.php index b29bc1b3ab..9739edd654 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -130,18 +130,18 @@ class project extends control if($this->cookie->preProjectID != $projectID) { $_COOKIE['moduleBrowseParam'] = $_COOKIE['productBrowseParam'] = 0; - setcookie('moduleBrowseParam', 0, $this->config->cookieLife, $this->config->webRoot); - setcookie('productBrowseParam', 0, $this->config->cookieLife, $this->config->webRoot); + setcookie('moduleBrowseParam', 0, 0, $this->config->webRoot); + setcookie('productBrowseParam', 0, 0, $this->config->webRoot); } if($browseType == 'bymodule') { - setcookie('moduleBrowseParam', (int)$param, $this->config->cookieLife, $this->config->webRoot); - setcookie('productBrowseParam', 0, $this->config->cookieLife, $this->config->webRoot); + setcookie('moduleBrowseParam', (int)$param, 0, $this->config->webRoot); + setcookie('productBrowseParam', 0, 0, $this->config->webRoot); } elseif($browseType == 'byproduct') { - setcookie('moduleBrowseParam', 0, $this->config->cookieLife, $this->config->webRoot); - setcookie('productBrowseParam', (int)$param, $this->config->cookieLife, $this->config->webRoot); + setcookie('moduleBrowseParam', 0, 0, $this->config->webRoot); + setcookie('productBrowseParam', (int)$param, 0, $this->config->webRoot); } else { @@ -161,7 +161,7 @@ class project extends control /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->projectTaskOrder ? $this->cookie->projectTaskOrder : 'status,id_desc'; - setcookie('projectTaskOrder', $orderBy, $this->config->cookieLife, $this->config->webRoot); + setcookie('projectTaskOrder', $orderBy, 0, $this->config->webRoot); /* Append id for secend sort. */ $sort = $this->loadModel('common')->appendOrder($orderBy); @@ -592,7 +592,7 @@ class project extends control /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->projectStoryOrder ? $this->cookie->projectStoryOrder : 'pri'; - setcookie('projectStoryOrder', $orderBy, $this->config->cookieLife, $this->config->webRoot); + setcookie('projectStoryOrder', $orderBy, 0, $this->config->webRoot); /* Append id for secend sort. */ $sort = $this->loadModel('common')->appendOrder($orderBy); diff --git a/module/testcase/control.php b/module/testcase/control.php index 812a608e2b..e9ff779fb5 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -69,10 +69,10 @@ class testcase extends control if($this->cookie->preProductID != $productID or $this->cookie->preBranch != $branch) { $_COOKIE['caseModule'] = 0; - setcookie('caseModule', 0, $this->config->cookieLife, $this->config->webRoot); + setcookie('caseModule', 0, 0, $this->config->webRoot); } - if($browseType == 'bymodule') setcookie('caseModule', (int)$param, $this->config->cookieLife, $this->config->webRoot); - if($browseType == 'bysuite') setcookie('caseSuite', (int)$param, $this->config->cookieLife, $this->config->webRoot); + if($browseType == 'bymodule') setcookie('caseModule', (int)$param, 0, $this->config->webRoot); + if($browseType == 'bysuite') setcookie('caseSuite', (int)$param, 0, $this->config->webRoot); if($browseType != 'bymodule') $this->session->set('caseBrowseType', $browseType); $moduleID = ($browseType == 'bymodule') ? (int)$param : ($browseType == 'bysearch' ? 0 : ($this->cookie->caseModule ? $this->cookie->caseModule : 0)); diff --git a/module/testsuite/control.php b/module/testsuite/control.php index 6130af1275..0b5f7b07ff 100644 --- a/module/testsuite/control.php +++ b/module/testsuite/control.php @@ -404,10 +404,10 @@ class testsuite extends control if($this->cookie->preCaseLibID != $libID) { $_COOKIE['libCaseModule'] = 0; - setcookie('libCaseModule', 0, $this->config->cookieLife, $this->config->webRoot); + setcookie('libCaseModule', 0, 0, $this->config->webRoot); } - if($browseType == 'bymodule') setcookie('libCaseModule', (int)$param, $this->config->cookieLife, $this->config->webRoot); + if($browseType == 'bymodule') setcookie('libCaseModule', (int)$param, 0, $this->config->webRoot); if($browseType != 'bymodule') $this->session->set('libBrowseType', $browseType); $moduleID = ($browseType == 'bymodule') ? (int)$param : ($browseType == 'bysearch' ? 0 : ($this->cookie->libCaseModule ? $this->cookie->libCaseModule : 0)); $queryID = ($browseType == 'bysearch') ? (int)$param : 0; diff --git a/module/testtask/control.php b/module/testtask/control.php index 51edf56313..cc24d6b0b1 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -263,9 +263,9 @@ class testtask extends control if($this->cookie->preTaskID != $taskID) { $_COOKIE['taskCaseModule'] = 0; - setcookie('taskCaseModule', 0, $this->config->cookieLife, $this->config->webRoot); + setcookie('taskCaseModule', 0, 0, $this->config->webRoot); } - if($browseType == 'bymodule') setcookie('taskCaseModule', (int)$param, $this->config->cookieLife, $this->config->webRoot); + if($browseType == 'bymodule') setcookie('taskCaseModule', (int)$param, 0, $this->config->webRoot); if($browseType != 'bymodule') $this->session->set('taskCaseBrowseType', $browseType); $moduleID = ($browseType == 'bymodule') ? (int)$param : ($browseType == 'bysearch' ? 0 : ($this->cookie->taskCaseModule ? $this->cookie->taskCaseModule : 0));