diff --git a/module/branch/control.php b/module/branch/control.php
index ab315b59f7..2606058728 100644
--- a/module/branch/control.php
+++ b/module/branch/control.php
@@ -20,7 +20,6 @@ class branch extends control
*/
public function manage($productID)
{
- $this->lang->product->menu = $this->lang->product->setMenu;
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID);
$moduleIndex = array_search('branch', $this->lang->noMenuModule);
diff --git a/module/bug/control.php b/module/bug/control.php
index 4aa2a53718..e982938b20 100644
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -478,20 +478,25 @@ class bug extends control
/* Get products and projects. */
$products = $this->products;
+ $projects = array('' => '');
if($projectID)
{
$products = array();
$productList = $this->product->getOrderedProducts('all', 40, $projectID);
foreach($productList as $product) $products[$product->id] = $product->name;
- $project = $this->loadModel('project')->getByID($projectID);
- $projects = array($projectID => $project->name);
+ $project = $this->loadModel('project')->getByID($projectID);
+ $projects += array($projectID => $project->name);
}
else
{
- $projects = $this->product->getProjectPairsByProduct($productID, $branch);
+ $projects += $this->product->getProjectPairsByProduct($productID, $branch);
}
+ /* Get executions. */
+ $executions = array('' => '');
+ if(isset($projects[$projectID])) $executions += $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID);
+
/* Set custom. */
foreach(explode(',', $this->config->bug->list->customCreateFields) as $field) $customFields[$field] = $this->lang->bug->$field;
$this->view->customFields = $customFields;
@@ -507,7 +512,7 @@ class bug extends control
$this->view->moduleOptionMenu = $moduleOptionMenu;
$this->view->stories = $stories;
$this->view->projects = $projects;
- $this->view->executions = $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID);
+ $this->view->executions = $executions;
$this->view->builds = $builds;
$this->view->moduleID = (int)$moduleID;
$this->view->projectID = $projectID;
@@ -653,7 +658,6 @@ class bug extends control
elseif($from == 'repo')
{
session_write_close();
- $this->lang->set('menugroup.bug', 'repo');
$repos = $this->loadModel('repo')->getRepoPairs($this->session->PRJ);
$this->repo->setMenu($repos);
$this->lang->bug->menu = $this->lang->repo->menu;
diff --git a/module/bug/js/common.js b/module/bug/js/common.js
index 78fcc13036..4710eda4bf 100644
--- a/module/bug/js/common.js
+++ b/module/bug/js/common.js
@@ -263,6 +263,7 @@ function loadProductProjects(productID)
function loadProductExecutions(productID, projectID = 0)
{
if(!projectID) projectID = $('#project').find("option:selected").val();
+ if(!projectID) productID = 0;
required = $('#execution_chosen').hasClass('required');
branch = $('#branch').val();
if(typeof(branch) == 'undefined') branch = 0;
diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php
index ad8b139165..1bdd2ad2b7 100644
--- a/module/bug/view/create.html.php
+++ b/module/bug/view/create.html.php
@@ -95,7 +95,7 @@ js::set('oldProjectID', $projectID);
-
+
diff --git a/module/common/lang/de.php b/module/common/lang/de.php
index 38427c0c35..be8732aebd 100644
--- a/module/common/lang/de.php
+++ b/module/common/lang/de.php
@@ -575,46 +575,6 @@ $lang->webhook = new stdclass();
$lang->message = new stdclass();
$lang->search = new stdclass();
-/* Menu group. */
-$lang->menugroup = new stdclass();
-$lang->menugroup->release = 'product';
-$lang->menugroup->story = 'product';
-$lang->menugroup->branch = 'product';
-$lang->menugroup->productplan = 'product';
-$lang->menugroup->task = 'project';
-$lang->menugroup->build = 'project';
-$lang->menugroup->convert = 'admin';
-$lang->menugroup->upgrade = 'admin';
-$lang->menugroup->user = 'company';
-$lang->menugroup->group = 'company';
-$lang->menugroup->bug = 'qa';
-$lang->menugroup->testcase = 'qa';
-$lang->menugroup->case = 'qa';
-$lang->menugroup->testtask = 'qa';
-$lang->menugroup->testsuite = 'qa';
-$lang->menugroup->caselib = 'qa';
-$lang->menugroup->testreport = 'qa';
-$lang->menugroup->report = 'reporting';
-$lang->menugroup->people = 'admin';
-$lang->menugroup->dept = 'company';
-$lang->menugroup->todo = 'my';
-$lang->menugroup->score = 'my';
-$lang->menugroup->action = 'admin';
-$lang->menugroup->backup = 'admin';
-$lang->menugroup->cron = 'admin';
-$lang->menugroup->extension = 'admin';
-$lang->menugroup->custom = 'admin';
-$lang->menugroup->mail = 'admin';
-$lang->menugroup->dev = 'admin';
-$lang->menugroup->entry = 'admin';
-$lang->menugroup->webhook = 'admin';
-$lang->menugroup->message = 'admin';
-
-$lang->menugroup->repo = 'ci';
-$lang->menugroup->jenkins = 'ci';
-$lang->menugroup->compile = 'ci';
-$lang->menugroup->job = 'ci';
-
/* Nav group.*/
$lang->navGroup = new stdclass();
$lang->navGroup->my = 'my';
diff --git a/module/common/lang/en.php b/module/common/lang/en.php
index 087b5c8e6f..fd35da3641 100644
--- a/module/common/lang/en.php
+++ b/module/common/lang/en.php
@@ -577,45 +577,6 @@ $lang->webhook = new stdclass();
$lang->message = new stdclass();
$lang->search = new stdclass();
-/* Menu group. */
-$lang->menugroup = new stdclass();
-$lang->menugroup->release = 'product';
-$lang->menugroup->story = 'product';
-$lang->menugroup->branch = 'product';
-$lang->menugroup->productplan = 'product';
-$lang->menugroup->task = 'project';
-$lang->menugroup->build = 'project';
-$lang->menugroup->convert = 'admin';
-$lang->menugroup->upgrade = 'admin';
-$lang->menugroup->user = 'company';
-$lang->menugroup->group = 'company';
-$lang->menugroup->bug = 'qa';
-$lang->menugroup->testcase = 'qa';
-$lang->menugroup->case = 'qa';
-$lang->menugroup->testtask = 'qa';
-$lang->menugroup->testsuite = 'qa';
-$lang->menugroup->caselib = 'qa';
-$lang->menugroup->testreport = 'qa';
-$lang->menugroup->people = 'admin';
-$lang->menugroup->dept = 'company';
-$lang->menugroup->todo = 'my';
-$lang->menugroup->score = 'my';
-$lang->menugroup->action = 'admin';
-$lang->menugroup->backup = 'admin';
-$lang->menugroup->cron = 'admin';
-$lang->menugroup->extension = 'admin';
-$lang->menugroup->custom = 'admin';
-$lang->menugroup->mail = 'admin';
-$lang->menugroup->dev = 'admin';
-$lang->menugroup->entry = 'admin';
-$lang->menugroup->webhook = 'admin';
-$lang->menugroup->message = 'admin';
-
-$lang->menugroup->repo = 'ci';
-$lang->menugroup->jenkins = 'ci';
-$lang->menugroup->compile = 'ci';
-$lang->menugroup->job = 'ci';
-
/* Nav group.*/
$lang->navGroup = new stdclass();
$lang->navGroup->my = 'my';
diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php
index 863cfc70db..0649e51949 100644
--- a/module/common/lang/fr.php
+++ b/module/common/lang/fr.php
@@ -567,45 +567,6 @@ $lang->webhook = new stdclass();
$lang->message = new stdclass();
$lang->search = new stdclass();
-/* Menu group. */
-$lang->menugroup = new stdclass();
-$lang->menugroup->release = 'product';
-$lang->menugroup->story = 'product';
-$lang->menugroup->branch = 'product';
-$lang->menugroup->productplan = 'product';
-$lang->menugroup->task = 'project';
-$lang->menugroup->build = 'project';
-$lang->menugroup->convert = 'admin';
-$lang->menugroup->upgrade = 'admin';
-$lang->menugroup->user = 'company';
-$lang->menugroup->group = 'company';
-$lang->menugroup->bug = 'qa';
-$lang->menugroup->testcase = 'qa';
-$lang->menugroup->case = 'qa';
-$lang->menugroup->testtask = 'qa';
-$lang->menugroup->testsuite = 'qa';
-$lang->menugroup->caselib = 'qa';
-$lang->menugroup->testreport = 'qa';
-$lang->menugroup->people = 'admin';
-$lang->menugroup->dept = 'company';
-$lang->menugroup->todo = 'my';
-$lang->menugroup->score = 'my';
-$lang->menugroup->action = 'admin';
-$lang->menugroup->backup = 'admin';
-$lang->menugroup->cron = 'admin';
-$lang->menugroup->extension = 'admin';
-$lang->menugroup->custom = 'admin';
-$lang->menugroup->mail = 'admin';
-$lang->menugroup->dev = 'admin';
-$lang->menugroup->entry = 'admin';
-$lang->menugroup->webhook = 'admin';
-$lang->menugroup->message = 'admin';
-
-$lang->menugroup->repo = 'ci';
-$lang->menugroup->jenkins = 'ci';
-$lang->menugroup->compile = 'ci';
-$lang->menugroup->job = 'ci';
-
/* Nav group.*/
$lang->navGroup = new stdclass();
$lang->navGroup->my = 'my';
diff --git a/module/common/lang/vi.php b/module/common/lang/vi.php
index b607d3c952..8ebf527bc8 100644
--- a/module/common/lang/vi.php
+++ b/module/common/lang/vi.php
@@ -573,45 +573,6 @@ $lang->webhook = new stdclass();
$lang->message = new stdclass();
$lang->search = new stdclass();
-/* Menu group. */
-$lang->menugroup = new stdclass();
-$lang->menugroup->release = 'product';
-$lang->menugroup->story = 'product';
-$lang->menugroup->branch = 'product';
-$lang->menugroup->productplan = 'product';
-$lang->menugroup->task = 'project';
-$lang->menugroup->build = 'project';
-$lang->menugroup->convert = 'admin';
-$lang->menugroup->upgrade = 'admin';
-$lang->menugroup->user = 'company';
-$lang->menugroup->group = 'company';
-$lang->menugroup->bug = 'qa';
-$lang->menugroup->testcase = 'qa';
-$lang->menugroup->case = 'qa';
-$lang->menugroup->testtask = 'qa';
-$lang->menugroup->testsuite = 'qa';
-$lang->menugroup->caselib = 'qa';
-$lang->menugroup->testreport = 'qa';
-$lang->menugroup->people = 'admin';
-$lang->menugroup->dept = 'company';
-$lang->menugroup->todo = 'my';
-$lang->menugroup->score = 'my';
-$lang->menugroup->action = 'admin';
-$lang->menugroup->backup = 'admin';
-$lang->menugroup->cron = 'admin';
-$lang->menugroup->extension = 'admin';
-$lang->menugroup->custom = 'admin';
-$lang->menugroup->mail = 'admin';
-$lang->menugroup->dev = 'admin';
-$lang->menugroup->entry = 'admin';
-$lang->menugroup->webhook = 'admin';
-$lang->menugroup->message = 'admin';
-
-$lang->menugroup->repo = 'ci';
-$lang->menugroup->jenkins = 'ci';
-$lang->menugroup->compile = 'ci';
-$lang->menugroup->job = 'ci';
-
/* Nav group.*/
$lang->navGroup = new stdclass();
$lang->navGroup->my = 'my';
diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php
index 03c398e3d9..ba4ace478c 100644
--- a/module/common/lang/zh-cn.php
+++ b/module/common/lang/zh-cn.php
@@ -360,7 +360,7 @@ $lang->execution->qaMenu->qa = array('link' => '仪表盘|execution|qa|e
$lang->execution->qaMenu->bug = array('link' => 'Bug|execution|bug|executionID=%s');
$lang->execution->qaMenu->testcase = array('link' => '用例|execution|testcase|executionID=%s');
$lang->execution->qaMenu->testtask = array('link' => '测试单|execution|testtask|executionID=%s');
-$lang->execution->qaMenu->testreport = array('link' => '报告|execution|testreport|exeutionID=%s');
+//$lang->execution->qaMenu->testreport = array('link' => '报告|testreport|browse|exeutionID=%s&type=execution');
$lang->execution->settingMenu = new stdclass();
$lang->execution->settingMenu = new stdclass();
diff --git a/module/common/lang/zh-tw.php b/module/common/lang/zh-tw.php
index 93208c2619..49b27fd9e1 100644
--- a/module/common/lang/zh-tw.php
+++ b/module/common/lang/zh-tw.php
@@ -576,43 +576,7 @@ $lang->message = new stdclass();
$lang->search = new stdclass();
/* 菜單分組。*/
-$lang->menugroup = new stdclass();
-$lang->menugroup->release = 'product';
-$lang->menugroup->story = 'product';
-$lang->menugroup->branch = 'product';
-$lang->menugroup->productplan = 'product';
-$lang->menugroup->task = 'project';
-$lang->menugroup->build = 'project';
-$lang->menugroup->convert = 'admin';
-$lang->menugroup->upgrade = 'admin';
-$lang->menugroup->user = 'company';
-$lang->menugroup->group = 'company';
-$lang->menugroup->bug = 'qa';
-$lang->menugroup->testcase = 'qa';
-$lang->menugroup->case = 'qa';
-$lang->menugroup->testtask = 'qa';
-$lang->menugroup->testsuite = 'qa';
-$lang->menugroup->caselib = 'qa';
-$lang->menugroup->testreport = 'qa';
-$lang->menugroup->people = 'admin';
-$lang->menugroup->dept = 'company';
-$lang->menugroup->todo = 'my';
-$lang->menugroup->score = 'my';
-$lang->menugroup->action = 'admin';
-$lang->menugroup->backup = 'admin';
-$lang->menugroup->cron = 'admin';
-$lang->menugroup->extension = 'admin';
-$lang->menugroup->custom = 'admin';
-$lang->menugroup->mail = 'admin';
-$lang->menugroup->dev = 'admin';
-$lang->menugroup->entry = 'admin';
-$lang->menugroup->webhook = 'admin';
-$lang->menugroup->message = 'admin';
-$lang->menugroup->repo = 'ci';
-$lang->menugroup->jenkins = 'ci';
-$lang->menugroup->compile = 'ci';
-$lang->menugroup->job = 'ci';
/* Nav group.*/
$lang->navGroup = new stdclass();
diff --git a/module/common/model.php b/module/common/model.php
index 42122af446..4ac68b40b6 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -751,19 +751,18 @@ class commonModel extends model
* Print the module menu.
*
* @param string $moduleName
+ * @param string $methodName
* @static
* @access public
* @return void
*/
- public static function printModuleMenu($moduleName)
+ public static function printModuleMenu($moduleName, $methodName)
{
global $config, $lang, $app;
- $moduleName = $app->rawModule;
- $methodName = $app->rawMethod;
/* Set main menu by openApp. */
$openApp = $app->openApp ? $app->openApp : $lang->navGroup->$moduleName;
- if(in_array($openApp, array('admin', 'repo', 'ops', 'feedback'))) return;
+ if(in_array($moduleName, array('admin', 'repo', 'ops', 'feedback'))) return;
if($openApp == 'my') self::getMyModuleMenu($moduleName, $methodName);
if($openApp == 'project') self::getProjectModuleMenu($moduleName, $methodName);
@@ -813,8 +812,6 @@ class commonModel extends model
/* The beginning of the menu. */
echo $isMobile ? '' : " \n";
- if(isset($lang->menugroup->$moduleName)) $moduleName = $lang->menugroup->$moduleName;
-
/* Cycling to print every sub menu. */
foreach($menu as $menuItem)
{
@@ -899,7 +896,6 @@ class commonModel extends model
{
global $lang;
$mainMenu = $moduleName;
- if(isset($lang->menugroup->$moduleName)) $mainMenu = $lang->menugroup->$moduleName;
echo "";
echo '- ' . html::a(helper::createLink('my', 'index'), $lang->zentaoPMS) . '
';
if($moduleName != 'index')
@@ -1783,7 +1779,6 @@ EOD;
if(!commonModel::hasDBPriv($object, $module, $method)) return false;
if(empty($acls['views'])) return true;
- $menu = isset($lang->menugroup->$module) ? $lang->menugroup->$module : $module;
$menu = strtolower($menu);
if($menu != 'qa' and !isset($lang->$menu->menu)) return true;
if($menu == 'my' or $menu == 'index' or $module == 'tree') return true;
@@ -2325,6 +2320,12 @@ EOD;
return;
}
+ if($methodName == 'create')
+ {
+ $lang->menu = $lang->$openApp->homeMenu;
+ return;
+ }
+
foreach($lang->$openApp->homeMenu as $menu)
{
$link = is_array($menu) ? $menu['link'] : $menu;
@@ -2404,7 +2405,6 @@ EOD;
{
$lang->project->dividerMenu = str_replace(',project,', ',', $lang->project->dividerMenu);
$lang->release->menu = new stdclass();
- $lang->menugroup->release = '';
$lang->menuOrder = $lang->waterfall->menuOrder;
return self::processMenuVars($lang->menu->waterfall);
}
diff --git a/module/common/view/header.html.php b/module/common/view/header.html.php
index a111e29586..69cb2853f8 100755
--- a/module/common/view/header.html.php
+++ b/module/common/view/header.html.php
@@ -36,7 +36,7 @@ $isQa = $app->openApp == 'qa';
diff --git a/module/company/control.php b/module/company/control.php
index 3abae4659c..4f9a603ac9 100644
--- a/module/company/control.php
+++ b/module/company/control.php
@@ -51,7 +51,6 @@ class company extends control
$this->lang->navGroup->company = 'admin';
$this->loadModel('search');
- $this->lang->set('menugroup.company', 'company');
$deptID = $type == 'bydept' ? (int)$param : 0;
$this->company->setMenu($deptID);
diff --git a/module/custom/model.php b/module/custom/model.php
index e303c10a9c..c3f33c75d4 100644
--- a/module/custom/model.php
+++ b/module/custom/model.php
@@ -319,7 +319,6 @@ class customModel extends model
global $app, $lang, $config;
$allMenu = $module == 'main' ? $lang->menu : (isset($lang->$module->menu) ? $lang->$module->menu : $lang->my->menu);
if($module == 'product' and isset($allMenu->branch)) $allMenu->branch = str_replace('@branch@', $lang->custom->branch, $allMenu->branch);
- if($module != 'main' and isset($lang->menugroup->$module)) $module = $lang->menugroup->$module;
$flowModule = $config->global->flow . '_' . $module;
$customMenu = isset($config->customMenu->$flowModule) ? $config->customMenu->$flowModule : array();
if(commonModel::isTutorialMode() && $module === 'main') $customMenu = 'my,product,project,qa,company';
diff --git a/module/doc/control.php b/module/doc/control.php
index 170fa8abb7..3d6e7bcadd 100644
--- a/module/doc/control.php
+++ b/module/doc/control.php
@@ -117,7 +117,6 @@ class doc extends control
$this->product->setMenu($this->product->getPairs(), $productID);
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
$this->lang->noMenuModule[] = 'doc';
- $this->lang->set('menugroup.doc', 'product');
}
elseif($from == 'project')
{
@@ -349,7 +348,6 @@ class doc extends control
$this->product->setMenu($this->product->getPairs(), $lib->product);
$this->lang->product->switcherMenu = $this->product->getSwitcher($lib->product);
$this->lang->noMenuModule[] = 'doc';
- $this->lang->set('menugroup.doc', 'product');
$this->lang->TRActions = common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), " " . $this->lang->doc->createlib, '', "class='btn btn-secondary iframe' data-width='70%'") : '';
}
@@ -360,7 +358,6 @@ class doc extends control
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
$this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $lib->project);
- $this->lang->set('menugroup.doc', 'project');
$this->lang->TRActions = common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), " " . $this->lang->doc->createlib, '', "class='btn btn-secondary iframe' data-width='70%'") : '';
}
@@ -436,7 +433,6 @@ class doc extends control
$this->product->setMenu($this->product->getPairs(), $objectID);
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
$this->lang->noMenuModule[] = 'doc';
- $this->lang->set('menugroup.doc', 'product');
}
elseif($this->from == 'project')
{
@@ -446,7 +442,6 @@ class doc extends control
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
$this->project->setMenu($this->project->getExecutionsByProject($this->session->PRJ, 'all', 0, true), $objectID);
- $this->lang->set('menugroup.doc', 'project');
}
else
{
@@ -501,7 +496,6 @@ class doc extends control
$this->product->setMenu($this->product->getPairs(), $objectID);
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
$this->lang->noMenuModule[] = 'doc';
- $this->lang->set('menugroup.doc', 'product');
}
elseif($this->from == 'project')
{
@@ -511,7 +505,6 @@ class doc extends control
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
$this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $objectID);
- $this->lang->set('menugroup.doc', 'project');
}
else
{
@@ -831,7 +824,6 @@ class doc extends control
$this->product->setMenu($this->product->getPairs(), $objectID);
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
$this->lang->noMenuModule[] = 'doc';
- $this->lang->set('menugroup.doc', 'product');
}
elseif($this->from == 'project')
{
@@ -840,7 +832,6 @@ class doc extends control
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
$this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $objectID);
- $this->lang->set('menugroup.doc', 'project');
}
else
{
@@ -927,16 +918,10 @@ class doc extends control
$this->product->setMenu($this->product->getPairs(), $objectID);
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
$this->lang->noMenuModule[] = 'doc';
- $this->lang->set('menugroup.doc', 'product');
}
elseif($from == 'project')
{
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
- $this->lang->set('menugroup.doc', 'project');
- }
- elseif($from == 'execution')
- {
- $this->lang->set('menugroup.doc', 'execution');
}
else
{
diff --git a/module/execution/control.php b/module/execution/control.php
index ee29e4ad0f..b0bde8a7a5 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -2823,6 +2823,8 @@ class execution extends control
$this->fetch('file', 'export2' . $this->post->fileType, $_POST);
}
+ $this->view->fileName = (in_array($status, array('all', 'undone')) ? $this->lang->execution->$status : $this->lang->execution->statusList[$status]) . $this->lang->execution->common;
+
$this->display();
}
diff --git a/module/group/control.php b/module/group/control.php
index 13e1ce479b..62ab941b33 100644
--- a/module/group/control.php
+++ b/module/group/control.php
@@ -146,9 +146,6 @@ class group extends control
$this->view->projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq('0')->andWhere('type')->eq('project')->orderBy('order_desc')->fetchPairs('id', 'name');
$this->view->products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('deleted')->eq('0')->orderBy('order_desc')->fetchPairs('id', 'name');
- $menugroup = array();
- foreach($this->lang->menugroup as $moduleName => $groupName) $menugroup[$groupName][$moduleName] = $moduleName;
- $this->view->menugroup = $menugroup;
$this->display();
}
diff --git a/module/group/model.php b/module/group/model.php
index 97f3a83336..f2ca1e9d02 100644
--- a/module/group/model.php
+++ b/module/group/model.php
@@ -354,15 +354,7 @@ class groupModel extends model
$dynamic = array();
foreach($actions['actions'] as $moduleName => $moduleActions)
{
- if(isset($this->lang->menugroup->$moduleName))
- {
- $groupModule = $this->lang->menugroup->$moduleName;
- if($groupModule != 'my' and !isset($actions['views'][$groupModule])) continue;
- }
- else
- {
- if($moduleName != 'my' and !isset($actions['views'][$moduleName])) continue;
- }
+ if($moduleName != 'my' and !isset($actions['views'][$moduleName])) continue;
$dynamic[$moduleName] = $moduleActions;
}
diff --git a/module/group/view/manageview.html.php b/module/group/view/manageview.html.php
index bc5cb699e4..54c2f587b0 100644
--- a/module/group/view/manageview.html.php
+++ b/module/group/view/manageview.html.php
@@ -93,7 +93,6 @@
mainNav as $module => $title):?>
- action->dynamicAction->$module) and !isset($menugroup[$module])) continue;?>
|
@@ -116,8 +115,6 @@
-
-
action->dynamicAction->$subModule)):?>
action->dynamicAction->$subModule as $action => $actionTitle):?>
diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php
index 13cf4aa501..d377925219 100644
--- a/module/my/view/testcase.html.php
+++ b/module/my/view/testcase.html.php
@@ -37,15 +37,25 @@
app->loadLang('testtask');
- $canBatchRun = common::hasPriv('testtask', 'batchRun');
- $canBatchEdit = common::hasPriv('testcase', 'batchEdit');
+ $canBatchRun = (common::hasPriv('testtask', 'batchRun') and $type == 'assigntome');
+ $canBatchEdit = (common::hasPriv('testcase', 'batchEdit') and $type == 'assigntome');
$canBatchAction = ($canBatchRun or $canBatchEdit);
?>
- | idAB);?> |
+
+
+
+
+
+
+ idAB);?>
+ |
priAB);?> |
testcase->title);?> |
+
+ testtask->common);?> |
+
typeAB);?> |
openedByAB);?> |
testtask->lastRunAccount);?> |
@@ -64,12 +74,21 @@
?>
|
+
+
+ />
+
+
+
id); ?>
|
pri?>' title='testcase->priList, $case->pri, $case->pri);?>'>testcase->priList, $case->pri, $case->pri)?> |
version";?>
task";?>
createLink('testcase', 'view', $params, '', '', $case->project), $case->title, null, "style='color: $case->color' data-group='project'");?> |
+
+ taskName;?> |
+
testcase->typeList, $case->type);?> |
openedBy);?> |
lastRunner);?> |
@@ -93,6 +112,25 @@
diff --git a/module/product/control.php b/module/product/control.php
index 2c967cca88..3cb60beadc 100644
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -323,6 +323,7 @@ class product extends control
if($programID)
{
$this->lang->program->switcherMenu = $this->loadModel('program')->getSwitcher($programID, true);
+ commonModel::setAppObjectID('program', $programID);
}
else
{
@@ -821,7 +822,8 @@ class product extends control
*/
public function ajaxGetProjects($productID, $branch = 0, $projectID = 0)
{
- $projects = $this->product->getProjectPairsByProduct($productID, $branch ? "0,$branch" : $branch);
+ $projects = array('' => '');
+ $projects += $this->product->getProjectPairsByProduct($productID, $branch ? "0,$branch" : $branch);
if($this->app->getViewType() == 'json') die(json_encode($peojects));
die(html::select('project', $projects, $projectID, "class='form-control' onchange='loadProductExecutions({$productID})'"));
@@ -844,7 +846,7 @@ class product extends control
if($number === '')
{
- die(html::select('execution', $executions, $executionID, "class='form-control' onchange='loadExecutionRelated(this.value)'"));
+ die(html::select('execution', array('' => '') + $executions, $executionID, "class='form-control' onchange='loadExecutionRelated(this.value)'"));
}
else
{
@@ -975,7 +977,6 @@ class product extends control
$this->app->loadLang($fromModule);
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
- $this->lang->set('menugroup.product', $activeMenu);
$this->lang->product->menu = $this->lang->qa->menu;
$this->lang->product->menuOrder = $this->lang->qa->menuOrder;
}
@@ -985,7 +986,6 @@ class product extends control
{
$this->app->loadLang($fromModule);
- $this->lang->set('menugroup.product', $activeMenu);
$projectModel = $this->loadModel('project')->getByID($this->session->PRJ);
$this->lang->product->menu = $this->lang->menu->{$projectModel->model};
$this->lang->product->menuOrder = $this->lang->{$projectModel->model}->menuOrder;
@@ -993,7 +993,6 @@ class product extends control
/* The secondary test menu processing in the project. */
if(in_array($fromModule, array('qa', 'bug', 'testtask', 'testreport')))
{
- $this->lang->set('menugroup.product', 'qa');
$moduleIndex = array_search('product', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
diff --git a/module/product/model.php b/module/product/model.php
index c300d38790..b8b1fc5a25 100644
--- a/module/product/model.php
+++ b/module/product/model.php
@@ -768,26 +768,6 @@ class productModel extends model
return $stories;
}
- /**
- * Get the total number of requirements associated with the product.
- *
- * @param array $productIdList
- * @param string $type
- * @param string $status closed|active|draft
- * @access public
- * @return int
- */
- public function getTotalStoriesByProduct($productIdList, $type, $status = '')
- {
- return $this->dao->select("count(*) as stories")->from(TABLE_STORY)
- ->where('type')->eq($type)
- ->andWhere('product')->in($productIdList)
- ->beginIF($status != '')->andWhere('status')->eq($status)
- ->beginIF($status == 'closed')->andWhere('closedReason')->eq('done')->fi()
- ->andWhere('deleted')->eq(0)
- ->fetch('stories');
- }
-
/**
* Batch get story stage.
*
diff --git a/module/project/control.php b/module/project/control.php
index af5e270629..1b6ecf4547 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -291,6 +291,12 @@ class project extends control
}
}
+ if($programID)
+ {
+ $this->lang->program->switcherMenu = $this->loadModel('program')->getSwitcher($programID, true);
+ commonModel::setAppObjectID('program', $programID);
+ }
+
$this->lang->noMenuModule[] = 'project';
$name = '';
diff --git a/module/project/model.php b/module/project/model.php
index 5df0b15a77..9adf2e9f48 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -330,7 +330,8 @@ class projectModel extends model
->where('t1.project')->eq($projectID)
->andWhere('t2.type')->eq($type)
->andWhere('t2.product')->in($productIdList)
- ->beginIF($status != 'all')->andWhere('t2.status')->eq($status)->fi()
+ ->beginIF($status == 'active')->andWhere('t2.status')->in('active,changed')->fi()
+ ->beginIF($status == 'closed')->andWhere('t2.status')->eq('closed')->fi()
->beginIF($status == 'closed')->andWhere('t2.closedReason')->eq('done')->fi()
->andWhere('deleted')->eq('0')
->fetch('stories');
diff --git a/module/projectstory/control.php b/module/projectstory/control.php
index 85d0986914..478b4963f6 100644
--- a/module/projectstory/control.php
+++ b/module/projectstory/control.php
@@ -68,7 +68,6 @@ class projectStory extends control
public function track($productID = 0, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
if(empty($productID)) $productID = key($this->products);
- $this->lang->menugroup->projectstory = 'track';
$this->lang->story->requirement = str_replace($this->lang->URCommon, $this->lang->URCommon, $this->lang->story->requirement);
$this->lang->story->story = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->story);
diff --git a/module/search/control.php b/module/search/control.php
index 257c754b99..0fa15be581 100644
--- a/module/search/control.php
+++ b/module/search/control.php
@@ -158,7 +158,6 @@ class search extends control
}
$this->lang->search->menu = $this->lang->admin->menu;
- $this->lang->menugroup->search = 'system';
$this->view->title = $this->lang->search->buildIndex;
$this->display();
diff --git a/module/story/control.php b/module/story/control.php
index 22ccbb3426..8ef1ce3776 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -652,7 +652,6 @@ class story extends control
$this->lang->story->menu = $this->lang->execution->menu;
$this->execution->setMenu($this->execution->getPairs($this->session->PRJ, 'all', 'nodeleted'), $executionID);
- $this->lang->set('menugroup.story', 'execution');
$this->lang->story->menuOrder = $this->lang->execution->menuOrder;
$execution = $this->execution->getByID($executionID);
@@ -676,7 +675,6 @@ class story extends control
else
{
$this->lang->story->menu = $this->lang->my->menu;
- $this->lang->set('menugroup.story', 'my');
$this->lang->story->menuOrder = $this->lang->my->menuOrder;
$this->loadModel('my')->setMenu();
@@ -1147,7 +1145,6 @@ class story extends control
$this->lang->story->menu = $this->lang->execution->menu;
$this->lang->story->menuOrder = $this->lang->execution->menuOrder;
$this->execution->setMenu($this->execution->getPairs($this->session->PRJ, 'all', 'nodeleted'), $executionID);
- $this->lang->set('menugroup.story', 'execution');
$execution = $this->execution->getByID($executionID);
$this->view->position[] = html::a($this->createLink('execution', 'story', "executionID=$execution->id"), $execution->name);
$this->view->title = $execution->name . $this->lang->colon . $this->lang->story->batchClose;
@@ -1156,7 +1153,6 @@ class story extends control
else
{
$this->lang->story->menu = $this->lang->my->menu;
- $this->lang->set('menugroup.story', 'my');
$this->lang->story->menuOrder = $this->lang->my->menuOrder;
$this->loadModel('my')->setMenu();
$this->view->position[] = html::a($this->createLink('my', 'story'), $this->lang->my->story);
@@ -1475,7 +1471,6 @@ class story extends control
$this->session->set('productList', $this->app->getURI(true));
$products = $this->product->getPairs();
- $this->lang->set('menugroup.story', 'qa');
$this->lang->navGroup->story = $from;
if($from == 'project')
diff --git a/module/task/control.php b/module/task/control.php
index db84a5884d..649a3d275f 100644
--- a/module/task/control.php
+++ b/module/task/control.php
@@ -463,7 +463,6 @@ class task extends control
$this->lang->navGroup->task = 'my';
$this->lang->task->menu = $this->lang->my->menu;
$this->lang->task->menuOrder = $this->lang->my->menuOrder;
- $this->lang->set('menugroup.task', 'my');
$this->loadModel('my')->setMenu();
$this->view->position[] = html::a($this->createLink('my', 'task'), $this->lang->my->task);
$this->view->title = $this->lang->task->batchEdit;
diff --git a/module/testcase/control.php b/module/testcase/control.php
index 1c94cd15d3..138a998dcc 100644
--- a/module/testcase/control.php
+++ b/module/testcase/control.php
@@ -48,8 +48,8 @@ class testcase extends control
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
//$this->lang->noMenuModule[] = $this->app->rawModule;
}
- else
- {
+ else
+ {
$this->lang->testcase->menu = $this->lang->projectQa->menu;
$this->lang->testcase->subMenu = $this->lang->projectQa->subMenu;
}
@@ -746,14 +746,14 @@ class testcase extends control
$caseIDList = $this->post->caseIDList ? $this->post->caseIDList : die(js::locate($this->session->caseList));
$caseIDList = array_unique($caseIDList);
-
- /* Get the edited cases. */
- $cases = $this->testcase->getByList($caseIDList);
$branchProduct = false;
/* The cases of a product. */
if($productID)
{
+ /* Get the edited cases. */
+ $cases = $this->testcase->getByList($caseIDList);
+
if($type == 'lib')
{
$libID = $productID;
@@ -789,8 +789,14 @@ class testcase extends control
/* The cases of my. */
else
{
+ /* Get the edited cases. */
+ $cases = $this->dao->select('t1.*,t2.id as runID')->from(TABLE_CASE)->alias('t1')
+ ->leftJoin(TABLE_TESTRUN)->alias('t2')->on('t1.id = t2.case')
+ ->where('t2.id')->in($caseIDList)
+ ->fetchAll('id');
+ $caseIDList = array_keys($cases);
+
$this->lang->testcase->menu = $this->lang->my->menu;
- $this->lang->set('menugroup.testcase', 'my');
$this->lang->testcase->menuOrder = $this->lang->my->menuOrder;
$this->loadModel('my')->setMenu();
diff --git a/module/testcase/model.php b/module/testcase/model.php
index 263d50c9b9..0618e1b2d9 100644
--- a/module/testcase/model.php
+++ b/module/testcase/model.php
@@ -530,7 +530,7 @@ class testcaseModel extends model
*/
public function getByAssignedTo($account, $orderBy = 'id_desc', $pager = null, $auto = 'no')
{
- return $this->dao->select('t1.*,t2.project,t2.pri,t2.title,t2.type,t2.openedBy,t2.color,t2.product,t2.branch,t2.module,t2.status')->from(TABLE_TESTRUN)->alias('t1')
+ return $this->dao->select('t1.*,t2.project,t2.pri,t2.title,t2.type,t2.openedBy,t2.color,t2.product,t2.branch,t2.module,t2.status,t3.name as taskName')->from(TABLE_TESTRUN)->alias('t1')
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id')
->leftJoin(TABLE_TESTTASK)->alias('t3')->on('t1.task = t3.id')
->where('t1.assignedTo')->eq($account)
diff --git a/module/testcase/view/batchedit.html.php b/module/testcase/view/batchedit.html.php
index 81831c1302..3eb4d7942c 100644
--- a/module/testcase/view/batchedit.html.php
+++ b/module/testcase/view/batchedit.html.php
@@ -67,7 +67,7 @@
product->getByID($cases[$caseID]->product);
@@ -79,7 +79,6 @@
}
$modules = $this->tree->getOptionMenu($cases[$caseID]->product, $viewType = 'case', 0, $cases[$caseID]->branch);
- $modules = array('ditto' => $this->lang->story->ditto) + $modules;
}
?>
diff --git a/module/testreport/control.php b/module/testreport/control.php
index 37c0f63310..364223f0a9 100644
--- a/module/testreport/control.php
+++ b/module/testreport/control.php
@@ -65,7 +65,7 @@ class testreport extends control
*/
public function browse($objectID = 0, $objectType = 'product', $extra = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
- if($objectType != 'product' and $objectType != 'project') die('Type Error!');
+ if($objectType != 'product' and $objectType != 'execution') die('Type Error!');
$this->session->set('reportList', $this->app->getURI(true));
$objectID = $this->commonAction($objectID, $objectType);
@@ -81,7 +81,7 @@ class testreport extends control
$reports = $this->testreport->getList($objectID, $objectType, $extra, $orderBy, $pager);
- if($objectType == 'project' and isset($_POST['taskIdList']))
+ if($objectType == 'execution' and isset($_POST['taskIdList']))
{
$taskIdList = $_POST['taskIdList'];
foreach($reports as $reportID => $report)
@@ -552,7 +552,6 @@ class testreport extends control
$executionID = $this->execution->saveState($objectID, $this->executions);
$this->execution->setMenu($this->executions, $executionID);
$this->lang->testreport->menu = $this->lang->execution->menu;
- $this->lang->menugroup->testreport = 'execution';
return $executionID;
}
}
diff --git a/module/testtask/control.php b/module/testtask/control.php
index d4bf822da4..540717c016 100644
--- a/module/testtask/control.php
+++ b/module/testtask/control.php
@@ -44,8 +44,8 @@ class testtask extends control
$this->app->loadConfig('qa');
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
}
- else
- {
+ else
+ {
$this->lang->testtask->menu = $this->lang->projectQa->menu;
$this->lang->testtask->subMenu = $this->lang->projectQa->subMenu;
}
@@ -448,24 +448,24 @@ class testtask extends control
$this->view->position[] = $this->lang->testtask->common;
$this->view->position[] = $this->lang->testtask->cases;
- $this->view->productID = $productID;
- $this->view->productName = $this->products[$productID];
- $this->view->task = $task;
- $this->view->runs = $runs;
- $this->view->users = $this->loadModel('user')->getPairs('noclosed|qafirst|noletter');
- $this->view->assignedToList= $assignedToList;
- $this->view->moduleTree = $this->loadModel('tree')->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createTestTaskLink'), $extra = $taskID);
- $this->view->browseType = $browseType;
- $this->view->param = $param;
- $this->view->orderBy = $orderBy;
- $this->view->taskID = $taskID;
- $this->view->moduleID = $moduleID;
- $this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all;
- $this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden';
- $this->view->pager = $pager;
- $this->view->branches = $this->loadModel('branch')->getPairs($productID);
- $this->view->setModule = false;
- $this->view->canBeChanged = $canBeChanged;
+ $this->view->productID = $productID;
+ $this->view->productName = $this->products[$productID];
+ $this->view->task = $task;
+ $this->view->runs = $runs;
+ $this->view->users = $this->loadModel('user')->getPairs('noclosed|qafirst|noletter');
+ $this->view->assignedToList = $assignedToList;
+ $this->view->moduleTree = $this->loadModel('tree')->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createTestTaskLink'), $extra = $taskID);
+ $this->view->browseType = $browseType;
+ $this->view->param = $param;
+ $this->view->orderBy = $orderBy;
+ $this->view->taskID = $taskID;
+ $this->view->moduleID = $moduleID;
+ $this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all;
+ $this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden';
+ $this->view->pager = $pager;
+ $this->view->branches = $this->loadModel('branch')->getPairs($productID);
+ $this->view->setModule = false;
+ $this->view->canBeChanged = $canBeChanged;
$this->display();
}
@@ -1077,23 +1077,31 @@ class testtask extends control
$caseIDList = $this->post->caseIDList ? $this->post->caseIDList : die(js::locate($url, 'parent'));
$caseIDList = array_unique($caseIDList);
+
/* The case of tasks of qa. */
if($productID)
{
$this->testtask->setMenu($this->products, $productID, $taskID);
- $this->view->moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0);
+ $this->view->moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($productID, 'case');
+
+ $cases = $this->dao->select('*')->from(TABLE_CASE)->where('id')->in($caseIDList)->fetchAll('id');
}
/* The case of my. */
else
{
$this->lang->testtask->menu = $this->lang->my->menu;
- $this->lang->set('menugroup.testtask', 'my');
$this->lang->testtask->menuOrder = $this->lang->my->menuOrder;
$this->loadModel('my')->setMenu();
$this->view->title = $this->lang->testtask->batchRun;
- }
- $cases = $this->dao->select('*')->from(TABLE_CASE)->where('id')->in($caseIDList)->fetchAll('id');
+ $cases = $this->dao->select('t1.*,t2.id as runID')->from(TABLE_CASE)->alias('t1')
+ ->leftJoin(TABLE_TESTRUN)->alias('t2')->on('t1.id = t2.case')
+ ->where('t2.id')->in($caseIDList)
+ ->fetchAll('runID');
+
+ $caseIDList = array();
+ foreach($cases as $case) $caseIDList[] = $case->id;
+ }
/* If case has changed and not confirmed, remove it. */
if($from == 'testtask')
@@ -1111,7 +1119,7 @@ class testtask extends control
$this->view->cases = $cases;
$this->view->steps = $this->dao->select('t1.*')->from(TABLE_CASESTEP)->alias('t1')
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case=t2.id')
- ->where('t2.id')->in(array_keys($cases))
+ ->where('t2.id')->in($caseIDList)
->andWhere('t1.version=t2.version')
->andWhere('t2.status')->ne('wait')
->fetchGroup('case', 'id');
diff --git a/module/testtask/model.php b/module/testtask/model.php
index d2aebb1b69..af5080ca05 100644
--- a/module/testtask/model.php
+++ b/module/testtask/model.php
@@ -1272,7 +1272,7 @@ class testtaskModel extends model
{
$runs = array();
$postData = fixer::input('post')->get();
- $caseIdList = array_keys($postData->results);
+ $caseIdList = isset($postData->caseIDList) ? array_keys($postData->caseIDList) : array_keys($postData->results);
if($runCaseType == 'testtask')
{
$runs = $this->dao->select('id, `case`')->from(TABLE_TESTRUN)
@@ -1291,7 +1291,8 @@ class testtaskModel extends model
$now = helper::now();
foreach($postData->results as $caseID => $result)
{
- $runID = isset($runs[$caseID]) ? $runs[$caseID] : 0;
+ $runID = isset($runs[$caseID]) ? $runs[$caseID] : (isset($postData->caseIDList) ? $caseID : 0);
+ $version = $postData->version[$caseID];
$dbSteps = isset($stepGroups[$caseID]) ? $stepGroups[$caseID] : array();
$postSteps = isset($postData->steps[$caseID]) ? $postData->steps[$caseID] : array();
$postReals = $postData->reals[$caseID];
@@ -1313,13 +1314,16 @@ class testtaskModel extends model
$step = array();
$step['result'] = $caseResult;
$step['real'] = $caseResult == 'pass' ? '' : $postReals[0];
- $stepResults[] = $step;
+ $stepResults[] = $step;
}
+ /* Replace caseID if caseID is runID. */
+ if(isset($postData->caseIDList[$caseID])) $caseID = $postData->caseIDList[$caseID];
+
$result = new stdClass();
$result->run = $runID;
$result->case = $caseID;
- $result->version = $postData->version[$caseID];
+ $result->version = $version;
$result->caseResult = $caseResult;
$result->stepResults = serialize($stepResults);
$result->lastRunner = $this->app->user->account;
diff --git a/module/testtask/view/batchrun.html.php b/module/testtask/view/batchrun.html.php
index bfcf061d23..bc99558c5b 100644
--- a/module/testtask/view/batchrun.html.php
+++ b/module/testtask/view/batchrun.html.php
@@ -20,7 +20,7 @@
diff --git a/module/todo/control.php b/module/todo/control.php
index 3a011752ff..6cbee1dcb0 100644
--- a/module/todo/control.php
+++ b/module/todo/control.php
@@ -388,7 +388,6 @@ class todo extends control
$this->lang->todo->menu = $this->lang->user->menu;
$this->lang->todo->menuOrder = $this->lang->user->menuOrder;
$this->lang->company->menu->browseUser['subModule'] = 'todo';
- $this->lang->set('menugroup.todo', $from);
}
elseif($from == 'my')
{
@@ -396,7 +395,6 @@ class todo extends control
$this->lang->todo->menuOrder = $this->lang->my->menuOrder;
$this->loadModel('my')->setMenu();
$this->lang->my->menu->todo['subModule'] = 'todo';
- $this->lang->set('menugroup.todo', $from);
}
$projects = $this->loadModel('project')->getPairsByModel('all');
diff --git a/module/tree/control.php b/module/tree/control.php
index 2de2951091..da1acc27d5 100644
--- a/module/tree/control.php
+++ b/module/tree/control.php
@@ -110,7 +110,6 @@ class tree extends control
$this->loadModel('bug')->setMenu($productPairs, $rootID);
$this->lang->tree->menu = $this->lang->bug->menu;
$this->lang->tree->menuOrder = $this->lang->bug->menuOrder;
- $this->lang->set('menugroup.tree', 'qa');
$title = $this->lang->tree->manageBug;
$position[] = html::a($this->createLink('bug', 'browse', "product=$rootID"), $product->name);
@@ -121,7 +120,6 @@ class tree extends control
$this->lang->navGroup->tree = 'feedback';
$this->lang->noMenuModule[] = 'tree';
- $this->lang->set('menugroup.tree', 'feedback');
$this->app->loadLang('feedback');
$this->lang->tree->menu = $this->lang->feedback->menu;
$root = new stdclass();
@@ -153,7 +151,6 @@ class tree extends control
$this->loadModel('testcase')->setMenu($productPairs, $rootID);
$this->lang->tree->menu = $this->lang->testcase->menu;
$this->lang->tree->menuOrder = $this->lang->testcase->menuOrder;
- $this->lang->set('menugroup.tree', 'qa');
$title = $this->lang->tree->manageCase;
$position[] = html::a($this->createLink('testcase', 'browse', "product=$rootID"), $product->name);
@@ -177,7 +174,6 @@ class tree extends control
$this->caselib->setLibMenu($this->caselib->getLibraries(), $rootID);
$this->lang->tree->menu = $this->lang->caselib->menu;
$this->lang->tree->menuOrder = $this->lang->caselib->menuOrder;
- $this->lang->set('menugroup.tree', 'qa');
$title = $this->lang->tree->manageCaseLib;
$position[] = html::a($this->createLink('caselib', 'browse', "libID=$rootID"), $lib->name);
@@ -214,7 +210,6 @@ class tree extends control
$this->doc->setMenu($type, $rootID, $currentModuleID);
$this->lang->tree->menu = $this->lang->doc->menu;
$this->lang->tree->menuOrder = $this->lang->doc->menuOrder;
- $this->lang->set('menugroup.tree', 'doc');
$title = $this->lang->tree->manageCustomDoc;
$position[] = html::a($this->createLink('doc', 'browse', "libID=$rootID"), $lib->name);
@@ -224,7 +219,6 @@ class tree extends control
{
$products = $this->product->getPairs('', $this->session->PRJ);
- $this->lang->set('menugroup.tree', 'product');
$this->product->setMenu($products, $rootID, $branch, 'line', '', 'line');
$this->lang->tree->menu = $this->lang->product->menu;
$this->lang->tree->menuOrder = $this->lang->product->menuOrder;
@@ -241,7 +235,6 @@ class tree extends control
}
elseif($viewType == 'trainskill')
{
- $this->lang->set('menugroup.tree', 'train');
$this->lang->tree->menu = $this->lang->trainskill->menu;
$title = $this->lang->tree->manageTrainskill;
@@ -252,12 +245,10 @@ class tree extends control
$postBrowseType = $this->session->postBrowseType ? $this->session->postBrowseType : 'train';
if($postBrowseType == 'train')
{
- $this->lang->set('menugroup.tree', 'train');
$this->lang->tree->menu = $this->lang->train->menu;
}
else
{
- $this->lang->set('menugroup.tree', 'company');
$this->lang->tree->menu = $this->lang->company->menu;
}
@@ -305,7 +296,6 @@ class tree extends control
$executions = $this->execution->getPairs($this->session->PRJ);
/* Set menu. */
- $this->lang->set('menugroup.tree', 'execution');
$this->execution->setMenu($executions, $rootID);
$this->lang->tree->menu = $this->lang->execution->menu;
$this->lang->tree->menuOrder = $this->lang->execution->menuOrder;
diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php
index dc9f891b64..728c87becd 100644
--- a/module/tree/view/browse.html.php
+++ b/module/tree/view/browse.html.php
@@ -10,8 +10,8 @@
* @link http://www.zentao.net
*/
?>
-navGroup->doc == 'doc'):?>
-doc->appendNavCSS();?>
+openApp == 'doc'):?>
+loadModel('doc')->appendNavCSS();?>
diff --git a/module/tutorial/control.php b/module/tutorial/control.php
index a380e88dfb..ebf7d5f344 100644
--- a/module/tutorial/control.php
+++ b/module/tutorial/control.php
@@ -109,7 +109,6 @@ class tutorial extends control
{
$taskModule = strtolower($taskName['nav']['module']);
if($taskModule == strtolower($module)) $hasPriv = true;
- if(isset($this->lang->menugroup->$taskModule) and $this->lang->menugroup->$taskModule == strtolower($module)) $hasPriv = true;
if($hasPriv) break;
}
if(!$hasPriv and $module == 'my' and $method == 'index') $hasPriv = true;
diff --git a/module/user/control.php b/module/user/control.php
index 590db35134..9850848034 100644
--- a/module/user/control.php
+++ b/module/user/control.php
@@ -83,7 +83,6 @@ class user extends control
$this->user->resetMenu();
/* set menus. */
- $this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($users, $userID);
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->todo;
@@ -126,7 +125,6 @@ class user extends control
$users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid');
/* Set menu. */
- $this->lang->set('menugroup.user', 'company');
/* Change the menu when in my module. */
$this->user->resetMenu();
@@ -175,7 +173,6 @@ class user extends control
$users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid');
/* Set the menu. */
- $this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($users, $userID);
/* Change the menu when in my module. */
@@ -220,7 +217,6 @@ class user extends control
$users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid');
/* Set menu. */
- $this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($users, $userID);
/* Load the lang of bug module. */
@@ -264,7 +260,6 @@ class user extends control
$users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid');
/* Set menu. */
- $this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($users, $userID);
/* Save session. */
@@ -321,7 +316,6 @@ class user extends control
$sort = $this->loadModel('common')->appendOrder($orderBy);
/* Set menu. */
- $this->lang->set('menugroup.user', 'company');
/* Change the menu when in my module. */
$this->user->resetMenu();
@@ -380,7 +374,6 @@ class user extends control
/* Set the menus. */
$this->loadModel('project');
- $this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($users, $userID);
/* Change the menu when in my module. */
@@ -423,7 +416,6 @@ class user extends control
$pager = pager::init($recTotal, $recPerPage, $pageID);
/* Set the menus. */
- $this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($users, $userID);
/* Change the menu when in my module. */
@@ -467,7 +459,6 @@ class user extends control
$pager = pager::init($recTotal, $recPerPage, $pageID);
/* Set the menus. */
- $this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($users, $userID);
/* Change the menu when in my module. */
@@ -545,7 +536,6 @@ class user extends control
*/
public function create($deptID = 0)
{
- $this->lang->set('menugroup.user', 'company');
$this->lang->user->menu = $this->lang->company->menu;
$this->lang->user->menuOrder = $this->lang->company->menuOrder;
@@ -603,7 +593,6 @@ class user extends control
if($group->role) $roleGroup[$group->role] = $group->id;
}
- $this->lang->set('menugroup.user', 'company');
$this->lang->user->menu = $this->lang->company->menu;
$this->lang->user->menuOrder = $this->lang->company->menuOrder;
@@ -647,7 +636,6 @@ class user extends control
*/
public function edit($userID)
{
- $this->lang->set('menugroup.user', 'company');
$this->lang->user->menu = $this->lang->company->menu;
$this->lang->user->menuOrder = $this->lang->company->menuOrder;
if(!empty($_POST))
@@ -694,7 +682,6 @@ class user extends control
if($this->post->account) $this->user->batchEdit();
die(js::locate($this->session->userList ? $this->session->userList : $this->createLink('company', 'browse', "deptID=$deptID"), 'parent'));
}
- $this->lang->set('menugroup.user', 'company');
$this->lang->user->menu = $this->lang->company->menu;
$this->lang->user->menuOrder = $this->lang->company->menuOrder;
@@ -1013,7 +1000,6 @@ class user extends control
$denyType = 'nopriv';
if(isset($rights[$module][$method]))
{
- $menu = isset($this->lang->menugroup->$module) ? $this->lang->menugroup->$module : $module;
$menu = strtolower($menu);
if(!isset($acls['views'][$menu])) $denyType = 'noview';
@@ -1105,7 +1091,6 @@ class user extends control
$users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid');
/* set menus. */
- $this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($users, $userID);
/* Save session. */
| |