diff --git a/htdocs/bom/lib/bom.lib.php b/htdocs/bom/lib/bom.lib.php index 94debfbee7b..df06986362f 100644 --- a/htdocs/bom/lib/bom.lib.php +++ b/htdocs/bom/lib/bom.lib.php @@ -134,6 +134,8 @@ function bomPrepareHead($object) //); // to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'bom'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'bom', 'remove'); + return $head; } diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php index d7c89b1cf99..e079cd431dd 100644 --- a/htdocs/core/lib/contact.lib.php +++ b/htdocs/core/lib/contact.lib.php @@ -103,7 +103,7 @@ function contact_prepare_head(Contact $object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $tab, 'contact'); + complete_head_from_modules($conf, $langs, $object, $head, $tab, 'contact', 'add', 'core'); // Notes if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { @@ -147,6 +147,8 @@ function contact_prepare_head(Contact $object) $head[$tab][2] = 'info'; $tab++;*/ + complete_head_from_modules($conf, $langs, $object, $head, $tab, 'contact', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $tab, 'contact', 'remove'); return $head; diff --git a/htdocs/core/lib/contract.lib.php b/htdocs/core/lib/contract.lib.php index 9ccffab8b49..7999db14f93 100644 --- a/htdocs/core/lib/contract.lib.php +++ b/htdocs/core/lib/contract.lib.php @@ -55,7 +55,7 @@ function contract_prepare_head(Contrat $object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'contract'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'contract', 'add', 'core'); if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; @@ -96,6 +96,8 @@ function contract_prepare_head(Contrat $object) $head[$h][2] = 'agenda'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'contract', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'contract', 'remove'); return $head; @@ -126,7 +128,7 @@ function contract_admin_prepare_head() // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab - complete_head_from_modules($conf, $langs, null, $head, $h, 'contract_admin'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'contract_admin', 'add', 'core'); $head[$h][0] = DOL_URL_ROOT.'/contrat/admin/contract_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFields"); @@ -146,6 +148,8 @@ function contract_admin_prepare_head() $head[$h][2] = 'attributeslines'; $h++; + complete_head_from_modules($conf, $langs, null, $head, $h, 'contract_admin', 'add', 'external'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'contract_admin', 'remove'); return $head; diff --git a/htdocs/core/lib/donation.lib.php b/htdocs/core/lib/donation.lib.php index f951d9b522f..100998a3ac9 100644 --- a/htdocs/core/lib/donation.lib.php +++ b/htdocs/core/lib/donation.lib.php @@ -83,7 +83,7 @@ function donation_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'donation'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'donation', 'add', 'core'); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; @@ -118,6 +118,8 @@ function donation_prepare_head($object) $head[$h][2] = 'info'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'donation', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'donation', 'remove'); return $head; diff --git a/htdocs/core/lib/expensereport.lib.php b/htdocs/core/lib/expensereport.lib.php index 3287227a05d..19e2e0ca00d 100644 --- a/htdocs/core/lib/expensereport.lib.php +++ b/htdocs/core/lib/expensereport.lib.php @@ -43,7 +43,7 @@ function expensereport_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'expensereport'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'expensereport', 'add', 'core'); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; @@ -80,6 +80,8 @@ function expensereport_prepare_head($object) $head[$h][2] = 'info'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'donation', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'expensereport', 'remove'); return $head; diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php index 6bfb7f717de..eaa1f85d142 100644 --- a/htdocs/core/lib/fichinter.lib.php +++ b/htdocs/core/lib/fichinter.lib.php @@ -61,7 +61,7 @@ function fichinter_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'intervention'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'intervention', 'add', 'core'); // Tab to link resources if (isModEnabled('resource')) { @@ -125,6 +125,8 @@ function fichinter_prepare_head($object) $head[$h][2] = 'info'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'intervention', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'intervention', 'remove'); return $head; diff --git a/htdocs/core/lib/fourn.lib.php b/htdocs/core/lib/fourn.lib.php index 59a16164f97..6b66c8d68e7 100644 --- a/htdocs/core/lib/fourn.lib.php +++ b/htdocs/core/lib/fourn.lib.php @@ -83,7 +83,7 @@ function facturefourn_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_invoice'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_invoice', 'add', 'core'); if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; @@ -120,6 +120,8 @@ function facturefourn_prepare_head($object) $head[$h][2] = 'info'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_invoice', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_invoice', 'remove'); return $head; @@ -189,7 +191,7 @@ function ordersupplier_prepare_head(CommandeFournisseur $object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_order'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_order', 'add', 'core'); if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; @@ -229,7 +231,11 @@ function ordersupplier_prepare_head(CommandeFournisseur $object) } $head[$h][2] = 'info'; $h++; + + complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_order', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_order', 'remove'); + return $head; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 047d255eb59..2a2675ed7bd 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9057,7 +9057,7 @@ function getLanguageCodeFromCountryCode($countrycode) * 'ecm' to add a tab for another ecm view * 'stock' to add a tab for warehouse view * @param string $mode 'add' to complete head, 'remove' to remove entries - * @param string $filterorigmodule Filter on module origin. 'external' will show only external modules. 'core' only core modules. No filter by default. + * @param string $filterorigmodule Filter on module origin: 'external' will show only external modules. 'core' only core modules. No filter (default) will add both. * @return void */ function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode = 'add', $filterorigmodule = '') diff --git a/htdocs/core/lib/hrm.lib.php b/htdocs/core/lib/hrm.lib.php index e53cc9b3965..5335dc1c75e 100644 --- a/htdocs/core/lib/hrm.lib.php +++ b/htdocs/core/lib/hrm.lib.php @@ -52,17 +52,11 @@ function establishment_prepare_head($object) $head[$h][2] = 'info'; $h++; - complete_head_from_modules($conf, $langs, $object, $head, $h, 'establishment', 'remove'); - - - $head[$h][0] = dol_buildpath("/hrm/admin/setup.php", 1); $head[$h][1] = $langs->trans("Settings"); $head[$h][2] = 'settings'; $h++; - complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm'); - $head[$h][0] = dol_buildpath("/hrm/admin/about.php", 1); $head[$h][1] = $langs->trans("About"); $head[$h][2] = 'about'; @@ -70,6 +64,9 @@ function establishment_prepare_head($object) complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm'); + + complete_head_from_modules($conf, $langs, $object, $head, $h, 'establishment', 'remove'); + return $head; } diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php index 9e60f20fd25..54e639058c4 100644 --- a/htdocs/core/lib/invoice.lib.php +++ b/htdocs/core/lib/invoice.lib.php @@ -84,7 +84,7 @@ function facture_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'invoice'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'invoice', 'add', 'core'); if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; @@ -121,6 +121,8 @@ function facture_prepare_head($object) $head[$h][2] = 'info'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'invoice', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'invoice', 'remove'); return $head; diff --git a/htdocs/core/lib/loan.lib.php b/htdocs/core/lib/loan.lib.php index 4692c0b938b..6f87fd851fb 100644 --- a/htdocs/core/lib/loan.lib.php +++ b/htdocs/core/lib/loan.lib.php @@ -51,7 +51,7 @@ function loan_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $tab, 'loan'); + complete_head_from_modules($conf, $langs, $object, $head, $tab, 'loan', 'add', 'core'); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; @@ -82,6 +82,8 @@ function loan_prepare_head($object) $head[$tab][2] = 'info'; $tab++; + complete_head_from_modules($conf, $langs, $object, $head, $tab, 'loan', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $tab, 'loan', 'remove'); return $head; diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index 677d8cfdaef..f235be0d070 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -80,7 +80,7 @@ function member_prepare_head(Adherent $object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'member'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'member', 'add', 'core'); $nbNote = 0; if (!empty($object->note_private)) { @@ -123,6 +123,8 @@ function member_prepare_head(Adherent $object) $h++; } + complete_head_from_modules($conf, $langs, $object, $head, $h, 'member', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'member', 'remove'); return $head; diff --git a/htdocs/core/lib/order.lib.php b/htdocs/core/lib/order.lib.php index 9128be56ea1..80d2c0c534d 100644 --- a/htdocs/core/lib/order.lib.php +++ b/htdocs/core/lib/order.lib.php @@ -96,7 +96,7 @@ function commande_prepare_head(Commande $object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'order'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'order', 'add', 'core'); if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; @@ -133,6 +133,8 @@ function commande_prepare_head(Commande $object) $head[$h][2] = 'info'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'order', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'order', 'remove'); return $head; diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 393a2f618a0..8559cc275ac 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -153,7 +153,7 @@ function product_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'product'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'product', 'add', 'core'); // Notes if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { @@ -201,8 +201,6 @@ function product_prepare_head($object) $head[$h][2] = 'documents'; $h++; - complete_head_from_modules($conf, $langs, $object, $head, $h, 'product', 'remove'); - // Log $head[$h][0] = DOL_URL_ROOT.'/product/agenda.php?id='.$object->id; $head[$h][1] = $langs->trans("Events"); @@ -213,6 +211,10 @@ function product_prepare_head($object) $head[$h][2] = 'agenda'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'product', 'add', 'external'); + + complete_head_from_modules($conf, $langs, $object, $head, $h, 'product', 'remove'); + return $head; } diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 6c4dbeffd8a..a8d29794b9d 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -244,7 +244,7 @@ function project_prepare_head(Project $project, $moreparam = '') // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $project, $head, $h, 'project'); + complete_head_from_modules($conf, $langs, $project, $head, $h, 'project', 'add', 'core'); if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { @@ -320,6 +320,8 @@ function project_prepare_head(Project $project, $moreparam = '') $head[$h][2] = 'agenda'; $h++; + complete_head_from_modules($conf, $langs, $project, $head, $h, 'project', 'add', 'external'); + complete_head_from_modules($conf, $langs, $project, $head, $h, 'project', 'remove'); return $head; @@ -381,7 +383,7 @@ function task_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'task'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'task', 'add', 'core'); if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; @@ -425,6 +427,8 @@ function task_prepare_head($object) $h++; } + complete_head_from_modules($conf, $langs, $object, $head, $h, 'task', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'task', 'remove'); return $head; diff --git a/htdocs/core/lib/propal.lib.php b/htdocs/core/lib/propal.lib.php index 06fae0dd81d..54c0614b147 100644 --- a/htdocs/core/lib/propal.lib.php +++ b/htdocs/core/lib/propal.lib.php @@ -73,7 +73,7 @@ function propal_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'propal'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'propal', 'add', 'core'); if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; @@ -110,6 +110,8 @@ function propal_prepare_head($object) $head[$h][2] = 'info'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'propal', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'propal', 'remove'); return $head; diff --git a/htdocs/core/lib/reception.lib.php b/htdocs/core/lib/reception.lib.php index 26f6817ed24..7f5c6e865de 100644 --- a/htdocs/core/lib/reception.lib.php +++ b/htdocs/core/lib/reception.lib.php @@ -66,7 +66,7 @@ function reception_prepare_head(Reception $object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'reception'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'reception', 'add', 'core'); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; @@ -96,6 +96,8 @@ function reception_prepare_head(Reception $object) $head[$h][2] = 'note'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'reception', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'reception', 'remove'); return $head; diff --git a/htdocs/core/lib/resource.lib.php b/htdocs/core/lib/resource.lib.php index f222857b9d8..ebfbaf224f6 100644 --- a/htdocs/core/lib/resource.lib.php +++ b/htdocs/core/lib/resource.lib.php @@ -55,7 +55,7 @@ function resource_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'resource'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'resource', 'add', 'core'); if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; @@ -99,6 +99,8 @@ function resource_prepare_head($object) $head[$h][2] = 'info'; $h++;*/ + complete_head_from_modules($conf, $langs, $object, $head, $h, 'resource', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'resource', 'remove'); return $head; diff --git a/htdocs/core/lib/salaries.lib.php b/htdocs/core/lib/salaries.lib.php index 57cb9675e3f..51ec880e31e 100644 --- a/htdocs/core/lib/salaries.lib.php +++ b/htdocs/core/lib/salaries.lib.php @@ -42,7 +42,7 @@ function salaries_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'salaries'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'salaries', 'add', 'core'); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; @@ -62,6 +62,8 @@ function salaries_prepare_head($object) $head[$h][2] = 'info'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'salaries', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'salaries', 'remove'); return $head; diff --git a/htdocs/core/lib/stock.lib.php b/htdocs/core/lib/stock.lib.php index 79844f5aed7..e2e8d7a63d2 100644 --- a/htdocs/core/lib/stock.lib.php +++ b/htdocs/core/lib/stock.lib.php @@ -69,13 +69,15 @@ function stock_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'stock'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'stock', 'add', 'core'); $head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$object->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'stock', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'stock', 'remove'); return $head; diff --git a/htdocs/core/lib/supplier_proposal.lib.php b/htdocs/core/lib/supplier_proposal.lib.php index e5c0ed7dbf9..3c9915bc951 100644 --- a/htdocs/core/lib/supplier_proposal.lib.php +++ b/htdocs/core/lib/supplier_proposal.lib.php @@ -59,7 +59,7 @@ function supplier_proposal_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_proposal'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_proposal', 'add', 'core'); if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; @@ -96,6 +96,8 @@ function supplier_proposal_prepare_head($object) $head[$h][2] = 'info'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_proposal', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_proposal', 'remove'); return $head; diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index eb814cb1295..4bfeeb5a5bf 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -102,7 +102,7 @@ function ticket_prepare_head($object) $h++; } - complete_head_from_modules($conf, $langs, $object, $head, $h, 'ticket'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'ticket', 'add', 'core'); // Attached files include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -140,6 +140,9 @@ function ticket_prepare_head($object) $head[$h][2] = 'tabTicketLogs'; $h++; + + complete_head_from_modules($conf, $langs, $object, $head, $h, 'ticket', 'add', 'external'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'ticket', 'remove'); return $head; diff --git a/htdocs/knowledgemanagement/lib/knowledgemanagement.lib.php b/htdocs/knowledgemanagement/lib/knowledgemanagement.lib.php index 12db6245087..2f189b05f5c 100644 --- a/htdocs/knowledgemanagement/lib/knowledgemanagement.lib.php +++ b/htdocs/knowledgemanagement/lib/knowledgemanagement.lib.php @@ -61,5 +61,7 @@ function knowledgemanagementAdminPrepareHead() //); // to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'knowledgemanagement'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'knowledgemanagement', 'remove'); + return $head; } diff --git a/htdocs/margin/lib/margins.lib.php b/htdocs/margin/lib/margins.lib.php index 10e449026fa..710862b250c 100644 --- a/htdocs/margin/lib/margins.lib.php +++ b/htdocs/margin/lib/margins.lib.php @@ -96,9 +96,10 @@ function marges_prepare_head() $head[$h][2] = 'checkMargins'; } - complete_head_from_modules($conf, $langs, null, $head, $h, 'margins', 'remove'); complete_head_from_modules($conf, $langs, null, $head, $h, 'margins'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'margins', 'remove'); + return $head; } diff --git a/htdocs/mrp/lib/mrp.lib.php b/htdocs/mrp/lib/mrp.lib.php index dac11e1dd1c..854244e53c7 100644 --- a/htdocs/mrp/lib/mrp.lib.php +++ b/htdocs/mrp/lib/mrp.lib.php @@ -55,5 +55,7 @@ function mrpAdminPrepareHead() //); // to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'mrp'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'mrp', 'remove'); + return $head; } diff --git a/htdocs/partnership/lib/partnership.lib.php b/htdocs/partnership/lib/partnership.lib.php index 62046fec68c..abf8dcca63b 100644 --- a/htdocs/partnership/lib/partnership.lib.php +++ b/htdocs/partnership/lib/partnership.lib.php @@ -68,6 +68,8 @@ function partnershipAdminPrepareHead() //); // to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'partnership'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'partnership', 'remove'); + return $head; } diff --git a/htdocs/product/inventory/lib/inventory.lib.php b/htdocs/product/inventory/lib/inventory.lib.php index bda792abec4..95bcfcd1fe5 100644 --- a/htdocs/product/inventory/lib/inventory.lib.php +++ b/htdocs/product/inventory/lib/inventory.lib.php @@ -52,6 +52,8 @@ function inventoryAdminPrepareHead() //); // to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'inventory'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'inventory', 'remove'); + return $head; } diff --git a/htdocs/product/stock/stocktransfer/lib/stocktransfer.lib.php b/htdocs/product/stock/stocktransfer/lib/stocktransfer.lib.php index 8460a6405bc..90fd3f25ba9 100644 --- a/htdocs/product/stock/stocktransfer/lib/stocktransfer.lib.php +++ b/htdocs/product/stock/stocktransfer/lib/stocktransfer.lib.php @@ -63,5 +63,7 @@ function stocktransferAdminPrepareHead() //); // to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'stocktransfer'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'stocktransfer', 'remove'); + return $head; } diff --git a/htdocs/recruitment/lib/recruitment.lib.php b/htdocs/recruitment/lib/recruitment.lib.php index cb1f0b7e2bc..acc7160f282 100644 --- a/htdocs/recruitment/lib/recruitment.lib.php +++ b/htdocs/recruitment/lib/recruitment.lib.php @@ -70,5 +70,7 @@ function recruitmentAdminPrepareHead() //); // to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'recruitment'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'recruitment', 'remove'); + return $head; } diff --git a/htdocs/workstation/lib/workstation.lib.php b/htdocs/workstation/lib/workstation.lib.php index 92ea28d8bfb..8250a85adda 100644 --- a/htdocs/workstation/lib/workstation.lib.php +++ b/htdocs/workstation/lib/workstation.lib.php @@ -61,5 +61,7 @@ function workstationAdminPrepareHead() //); // to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'workstation'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'workstation', 'remove'); + return $head; } diff --git a/htdocs/zapier/lib/zapier.lib.php b/htdocs/zapier/lib/zapier.lib.php index dedec01ac71..5b6a3bd335a 100644 --- a/htdocs/zapier/lib/zapier.lib.php +++ b/htdocs/zapier/lib/zapier.lib.php @@ -54,5 +54,7 @@ function zapierAdminPrepareHead() //); // to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'zapier'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'zapier', 'remove'); + return $head; }