This commit is contained in:
hufangzhou
2021-10-14 15:46:54 +08:00
8 changed files with 11 additions and 9 deletions
+1 -1
View File
@@ -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();
+4 -2
View File
@@ -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)
{
+1 -1
View File
@@ -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')));
}
/**
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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');
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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. */