diff --git a/module/bug/zen.php b/module/bug/zen.php index a17c11992e..0767785f41 100644 --- a/module/bug/zen.php +++ b/module/bug/zen.php @@ -1082,7 +1082,7 @@ class bugZen extends bug if($bug->toTask) $taskIdList[$bug->toTask] = $bug->toTask; } - $showModule = !empty($this->config->datatable->bugBrowse->showModule) ? $this->config->datatable->bugBrowse->showModule : ''; + $showModule = !empty($this->config->bug->browse->showModule) ? $this->config->bug->browse->showModule : ''; /* Set view. */ $this->view->title = $product->name . $this->lang->colon . $this->lang->bug->common; diff --git a/module/caselib/control.php b/module/caselib/control.php index 6d2ef3a19d..b2f91ecd2c 100644 --- a/module/caselib/control.php +++ b/module/caselib/control.php @@ -186,7 +186,7 @@ class caselib extends control $this->loadModel('datatable'); $this->loadModel('tree'); - $showModule = !empty($this->config->datatable->caselibBrowse->showModule) ? $this->config->datatable->caselibBrowse->showModule : ''; + $showModule = !empty($this->config->caselib->browse->showModule) ? $this->config->caselib->browse->showModule : ''; $this->view->modulePairs = $showModule ? $this->tree->getModulePairs($libID, 'caselib', $showModule) : array(); $this->view->title = $this->lang->caselib->common . $this->lang->colon . $libraries[$libID]; diff --git a/module/datatable/control.php b/module/datatable/control.php index 5408b7af25..77617d7190 100644 --- a/module/datatable/control.php +++ b/module/datatable/control.php @@ -59,11 +59,10 @@ class datatable extends control $account = $this->app->user->account; if($account == 'guest') return $this->send(array('result' => 'fail', 'target' => $target, 'message' => 'guest.')); - $name = 'datatable.' . $this->post->target . '.' . $this->post->name; - $this->loadModel('setting')->setItem($account . '.' . $name, $this->post->value); + $this->loadModel('setting')->setItem($account . '.' . $this->post->currentModule . '.' . $this->post->currentMethod . '.showModule', $this->post->value); if($this->post->allModule !== false) $this->setting->setItem("$account.execution.task.allModule", $this->post->allModule); - if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => 'dao error.')); + if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); return $this->send(array('result' => 'success', 'closeModal' => true, 'load' => true)); } } diff --git a/module/execution/control.php b/module/execution/control.php index b97159e19f..3fea90306d 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -874,7 +874,7 @@ class execution extends control $productPairs = $this->loadModel('product')->getProductPairsByProject($executionID); if(empty($productID)) $productID = (int)key($productPairs); - $showModule = !empty($this->config->datatable->executionStory->showModule) ? $this->config->datatable->executionStory->showModule : ''; + $showModule = !empty($this->config->execution->story->showModule) ? $this->config->execution->story->showModule : ''; $modulePairs = $showModule ? $this->tree->getModulePairs($type == 'byproduct' ? $param : 0, 'story', $showModule) : array(); $createModuleLink = $storyType == 'story' ? 'createStoryLink' : 'createRequirementLink'; @@ -1061,7 +1061,7 @@ class execution extends control } $tree = $moduleID ? $this->tree->getByID($moduleID) : ''; - $showModule = !empty($this->config->datatable->executionBug->showModule) ? $this->config->datatable->executionBug->showModule : ''; + $showModule = !empty($this->config->execution->bug->showModule) ? $this->config->execution->bug->showModule : ''; /* Assign. */ $this->view->title = $execution->name . $this->lang->colon . $this->lang->execution->bug; diff --git a/module/product/control.php b/module/product/control.php index eeb6ac55e7..aacbee2847 100755 --- a/module/product/control.php +++ b/module/product/control.php @@ -132,7 +132,7 @@ class product extends control $this->loadModel('tree'); $isProjectStory = $this->app->rawModule == 'projectstory'; $cookieOrderBy = zget($this->cookie, 'productStoryOrder', 'id_desc'); - $showModule = !empty($this->config->datatable->productBrowse->showModule) ? $this->config->datatable->productBrowse->showModule : ''; //config->datatable->productBrowse may be undefined. + $showModule = !empty($this->config->product->browse->showModule) ? $this->config->product->browse->showModule : ''; /* Load pager. */ $this->app->loadClass('pager', true); diff --git a/module/project/control.php b/module/project/control.php index 87a1127561..5ffd96e1c6 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -936,10 +936,9 @@ class project extends control if($bug->task) $taskIdList[$bug->task] = $bug->task; if($bug->toTask) $taskIdList[$bug->toTask] = $bug->toTask; } - $storyList = $storyIdList ? $this->loadModel('story')->getByList($storyIdList) : array(); - $taskList = $taskIdList ? $this->loadModel('task')->getByIdList($taskIdList) : array(); - - $showModule = !empty($this->config->datatable->projectBug->showModule) ? $this->config->datatable->projectBug->showModule : ''; + $storyList = $storyIdList ? $this->loadModel('story')->getByList($storyIdList) : array(); + $taskList = $taskIdList ? $this->loadModel('task')->getByIdList($taskIdList) : array(); + $showModule = !empty($this->config->project->bug->showModule) ? $this->config->project->bug->showModule : ''; /* Assign. */ $this->view->title = $title; diff --git a/module/testcase/control.php b/module/testcase/control.php index 3acc854fa4..0d82227415 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -217,7 +217,7 @@ class testcase extends control $searchProducts = $this->product->getPairs('', 0, '', 'all'); $this->testcase->buildSearchForm($productID, $searchProducts, $queryID, $actionURL, $projectID); - $showModule = !empty($this->config->datatable->testcaseBrowse->showModule) ? $this->config->datatable->testcaseBrowse->showModule : ''; + $showModule = !empty($this->config->testcase->browse->showModule) ? $this->config->testcase->browse->showModule : ''; /* Get module tree.*/ if($projectID and empty($productID))