diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php
index 403ba46524..c46c70bedf 100644
--- a/module/bug/view/browse.html.php
+++ b/module/bug/view/browse.html.php
@@ -32,13 +32,13 @@ js::set('bugBrowseType', ($browseType == 'bymodule' and $this->session->bugBrows
?>
- customMenu['featurebar'] as $type => $featurebar):?>
-
-
-
-
createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=bySearch¶m=$queryID"), $featurebar['link'])?>
+ moduleName, $this->methodName) as $menuItem):?>
+ hidden)) continue;?>
+ name, 'QUERY') === 0):?>
+ name, 5);?>
+
- createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$type¶m=0"), $featurebar['link'])?>
+
bug->byQuery;?>
diff --git a/module/custom/control.php b/module/custom/control.php
index 7d8f98adf4..844610b8d6 100644
--- a/module/custom/control.php
+++ b/module/custom/control.php
@@ -202,7 +202,7 @@ class custom extends control
foreach ($menus as $menu)
{
$menu = json_decode($menu);
- $this->custom->saveCustomMenu($menu->value, $menu->module, $menu->method);
+ $this->custom->saveCustomMenu($menu->value, $menu->module, isset($menu->method) ? $menu->method : '');
}
}
else
@@ -222,6 +222,11 @@ class custom extends control
{
$menu = array();
$menu['main'] = customModel::getModuleMenu('main', true);
+ if($method)
+ {
+ $this->app->loadLang($module);
+ $this->loadModel('search')->mergeFeatureBar($module, $method);
+ }
if($module !== 'main')
{
$menu['module'] = customModel::getModuleMenu($module, true);
diff --git a/module/custom/model.php b/module/custom/model.php
index fb92e4d58f..395e07b113 100644
--- a/module/custom/model.php
+++ b/module/custom/model.php
@@ -242,7 +242,7 @@ class customModel extends model
if(empty($app->customMenu)) $app->customMenu = array();
if(!$rebuild && !empty($app->customMenu[$module])) return $app->customMenu[$module];
- $menuConfig = $config->menucustom->$module;
+ $menuConfig = isset($config->menucustom->$module) ? $config->menucustom->$module : array();
if(!empty($menuConfig)) $menuConfig = json_decode($menuConfig);
if(!isset($menuConfig) && common::inNoviceMode()) $menuConfig = $config->menu->$module['novice'];
@@ -292,7 +292,7 @@ class customModel extends model
* @access public
* @return void
*/
- public function saveCustomMenu($menu, $module, $method)
+ public function saveCustomMenu($menu, $module, $method = '')
{
$account = $this->app->user->account;
$settingKey = '';
@@ -305,7 +305,7 @@ class customModel extends model
}
else
{
- $settingKey = "$account.common.menucustom.feature_$module_$method";
+ $settingKey = "$account.common.menucustom.feature_{$module}_{$method}";
}
$this->loadModel('setting')->setItem($settingKey, $menu);
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php
index 1348983bb8..76ef08eec9 100644
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -29,7 +29,7 @@
moduleName, $this->methodName) as $menuItem):?>
- hidden) continue;?>
+ hidden)) continue;?>
name, 'QUERY') === 0):?>
name, 5);?>
diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php
index 6e4d9e6f47..2b5f286f89 100644
--- a/module/project/view/task.html.php
+++ b/module/project/view/task.html.php
@@ -48,7 +48,7 @@ js::set('browseType', $browseType);
moduleName, $this->methodName) as $menuItem):?>
hidden) continue;
+ if(isset($menuItem->hidden)) continue;
$type = $menuItem->name;
if(strpos($type, 'QUERY') === 0)
{
diff --git a/module/testcase/view/caseheader.html.php b/module/testcase/view/caseheader.html.php
index ef209d8d42..5248426dfb 100644
--- a/module/testcase/view/caseheader.html.php
+++ b/module/testcase/view/caseheader.html.php
@@ -19,9 +19,9 @@
$hasGroupPriv = common::hasPriv('testcase', 'groupcase');
$hasZeroPriv = common::hasPriv('story', 'zerocase');
?>
- moduleName, $this->methodName) as $menuItem):?>
+
hidden) continue;
+ if(isset($menuItem->hidden)) continue;
$type = $menuItem->name;
if($hasBrowsePriv and strpos($type, 'QUERY') === 0)
{
diff --git a/module/testtask/view/caseheader.html.php b/module/testtask/view/caseheader.html.php
index c8d67da7b0..6309753544 100644
--- a/module/testtask/view/caseheader.html.php
+++ b/module/testtask/view/caseheader.html.php
@@ -22,7 +22,7 @@
?>
moduleName, $this->methodName) as $menuItem):?>
hidden) continue;
+ if(isset($menuItem->hidden)) continue;
$type = $menuItem->name;
if($hasCasesPriv and strpos($type, 'QUERY') === 0)
{