From d963aa8832c0a79c80f1e132c53119fa6b40082e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Hahn?= Date: Mon, 4 Oct 2021 19:19:12 +0200 Subject: [PATCH] Allow removal of tabs For being able to remove or replace tabs, it is also necessary to call this function with 'remove' mode. --- htdocs/bom/lib/bom.lib.php | 4 +++- htdocs/mrp/lib/mrp_mo.lib.php | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/bom/lib/bom.lib.php b/htdocs/bom/lib/bom.lib.php index 8f3cadeedc2..edd9bd69ef4 100644 --- a/htdocs/bom/lib/bom.lib.php +++ b/htdocs/bom/lib/bom.lib.php @@ -54,7 +54,9 @@ function bomAdminPrepareHead() //$this->tabs = array( // 'entity:-tabname:Title:@bom:/bom/mypage.php?id=__ID__' //); // to remove a tab - complete_head_from_modules($conf, $langs, null, $head, $h, 'bom'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'bom@mrp'); + + complete_head_from_modules($conf, $langs, $object, $head, $h, 'bom@mrp', 'remove'); return $head; } diff --git a/htdocs/mrp/lib/mrp_mo.lib.php b/htdocs/mrp/lib/mrp_mo.lib.php index 8fe07df89c1..fd268c8f6f8 100644 --- a/htdocs/mrp/lib/mrp_mo.lib.php +++ b/htdocs/mrp/lib/mrp_mo.lib.php @@ -103,6 +103,8 @@ function moPrepareHead($object) // 'entity:-tabname:Title:@mrp:/mrp/mypage.php?id=__ID__' //); // to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'mo@mrp'); + + complete_head_from_modules($conf, $langs, $object, $head, $h, 'mo@mrp', 'remove'); return $head; }