diff --git a/module/caselib/control.php b/module/caselib/control.php index d3f750f987..80dcf2fbd7 100644 --- a/module/caselib/control.php +++ b/module/caselib/control.php @@ -377,7 +377,7 @@ class caselib extends control { $libID = (int)$libID; $lib = $this->caselib->getById($libID, true); - if(!isset($lib->id)) die(js::error($this->lang->notFound) . js::locate('back')); + if(!isset($lib->id)) die(js::error($this->lang->notFound) . js::locate($this->createLink('qa', 'index'))); /* Set lib menu. */ $libraries = $this->caselib->getLibraries(); diff --git a/module/company/control.php b/module/company/control.php index bbe67e045b..be57833a37 100644 --- a/module/company/control.php +++ b/module/company/control.php @@ -216,8 +216,7 @@ class company extends control /* Get projects' list.*/ $projects = $this->loadModel('project')->getPairsByProgram(0); - $projects = array($this->lang->company->project) + $projects; - $this->view->projects = $projects; + $this->view->projects = array($this->lang->company->project) + $projects;; /* Get executions' list.*/ $executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode'); @@ -255,10 +254,13 @@ class company extends control /* Build search form. */ $executions[0] = ''; $products[0] = ''; + $projects[0] = ''; ksort($executions); ksort($products); + ksort($projects); $executions['all'] = $this->lang->execution->allExecutions; $products['all'] = $this->lang->product->allProduct; + $projects['all'] = $this->lang->project->all; foreach($this->lang->action->search->label as $action => $name) { diff --git a/module/execution/model.php b/module/execution/model.php index 14e873a5fe..a1ebf3927e 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -49,7 +49,7 @@ class executionModel extends model $loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login"; if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(helper::createLink('execution', 'index'))); - die(js::locate('back')); + die(js::locate(helper::createLink('execution', 'all'))); } /** diff --git a/module/product/control.php b/module/product/control.php index 84c61c70e3..b4b1afd4e3 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -697,7 +697,7 @@ class product extends control if(!$product) { if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => '404 Not found')); - die(js::error($this->lang->notFound) . js::locate('back')); + die(js::error($this->lang->notFound) . js::locate($this->createLink('product', 'index'))); } $product->desc = $this->loadModel('file')->setImgSize($product->desc); diff --git a/module/product/model.php b/module/product/model.php index 23439e571a..1a4f78dcae 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -542,7 +542,7 @@ class productModel extends model $line->parent = 0; $line->grade = 1; $line->name = $this->post->lineName; - $line->root = $product->program; + $line->root = $this->config->systemMode == 'new' ? $product->program : 0; $line->order = $maxOrder; $this->dao->insert(TABLE_MODULE)->data($line)->exec(); diff --git a/module/release/control.php b/module/release/control.php index bee5bea94b..346f0c06d3 100644 --- a/module/release/control.php +++ b/module/release/control.php @@ -160,7 +160,7 @@ class release extends control { $releaseID = (int)$releaseID; $release = $this->release->getByID($releaseID, true); - if(!$release) die(js::error($this->lang->notFound) . js::locate('back')); + if(!$release) die(js::error($this->lang->notFound) . js::locate($this->createLink('product', 'index'))); if($type == 'story') $this->session->set('storyList', $this->app->getURI(true), 'product'); if($type == 'bug' or $type == 'leftBug') $this->session->set('bugList', $this->app->getURI(true), 'qa'); diff --git a/module/task/control.php b/module/task/control.php index beeaf7b58f..043c0f8746 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -692,7 +692,7 @@ class task extends control if(!$task) { if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => '404 Not found')); - die(js::error($this->lang->notFound) . js::locate('back')); + die(js::error($this->lang->notFound) . js::locate($this->createLink('execution', 'all'))); } $this->session->project = $task->project; diff --git a/module/testtask/control.php b/module/testtask/control.php index 1f3d1753c4..61c686b1d0 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -290,7 +290,7 @@ class testtask extends control if(!$task) { if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'message' => '404 Not found')); - die(js::error($this->lang->notFound) . js::locate('back')); + die(js::error($this->lang->notFound) . js::locate($this->createLink('qa', 'index'))); } /* When the session changes, you need to query the related products again. */