diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 113d12570cb..13639753004 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -605,7 +605,7 @@ if ($mode != 'marketplace') else $text.=$langs->trans("No"); $text.='
'.$langs->trans("AddMenus").': '; - if (isset($objMod->menu) && is_array($objMod->menu) && ! empty($objMod->menu)) + if (isset($objMod->menu) && ! empty($objMod->menu)) // objMod can be an array or just an int 1 { $text.=$langs->trans("Yes"); } diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index 60d99438f4f..af081130db4 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -284,8 +284,10 @@ class modAccounting extends DolibarrModules $this->rights[$r][5] = ''; $r++; - // Main menu entries - $this->menus = array(); - $r = 0; + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + } } diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index bcf7c32b74e..d2a4489611b 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -256,6 +256,12 @@ class modAdherent extends DolibarrModules $this->rights[$r][4] = 'cotisation'; $this->rights[$r][5] = 'creer'; + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports //-------- $r=0; diff --git a/htdocs/core/modules/modBanque.class.php b/htdocs/core/modules/modBanque.class.php index 86c772fe4c8..511d28eb935 100644 --- a/htdocs/core/modules/modBanque.class.php +++ b/htdocs/core/modules/modBanque.class.php @@ -135,7 +135,11 @@ class modBanque extends DolibarrModules $this->rights[$r][4] = 'cheque'; - + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports //-------- $r=0; diff --git a/htdocs/core/modules/modBookmark.class.php b/htdocs/core/modules/modBookmark.class.php index 5614ceb53ab..2de22e80611 100644 --- a/htdocs/core/modules/modBookmark.class.php +++ b/htdocs/core/modules/modBookmark.class.php @@ -98,5 +98,10 @@ class modBookmark extends DolibarrModules $this->rights[$r][3] = 1; // La permission est-elle une permission par d�faut $this->rights[$r][4] = 'supprimer'; + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + } } diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index 75260ef0a5a..54c6cd48978 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -107,6 +107,12 @@ class modCategorie extends DolibarrModules $this->rights[$r][4] = 'supprimer'; $r++; + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports //-------- $r=0; diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index 2d3080f892a..d5ec137a027 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -170,6 +170,12 @@ class modCommande extends DolibarrModules $this->rights[$r][4] = 'commande'; $this->rights[$r][5] = 'export'; + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports //-------- $r=0; diff --git a/htdocs/core/modules/modComptabilite.class.php b/htdocs/core/modules/modComptabilite.class.php index ca49ab12f7d..a7cda9a4109 100644 --- a/htdocs/core/modules/modComptabilite.class.php +++ b/htdocs/core/modules/modComptabilite.class.php @@ -94,6 +94,12 @@ class modComptabilite extends DolibarrModules $this->rights[$r][3] = 1; $this->rights[$r][4] = 'resultat'; $this->rights[$r][5] = 'lire'; + + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + } diff --git a/htdocs/core/modules/modContrat.class.php b/htdocs/core/modules/modContrat.class.php index d298c5aa182..108490daaaf 100644 --- a/htdocs/core/modules/modContrat.class.php +++ b/htdocs/core/modules/modContrat.class.php @@ -130,6 +130,11 @@ class modContrat extends DolibarrModules $this->rights[$r][4] = 'export'; + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports //-------- $langs->load("contracts"); diff --git a/htdocs/core/modules/modDeplacement.class.php b/htdocs/core/modules/modDeplacement.class.php index 7a0760a603d..ab4e7a0095f 100644 --- a/htdocs/core/modules/modDeplacement.class.php +++ b/htdocs/core/modules/modDeplacement.class.php @@ -108,6 +108,12 @@ class modDeplacement extends DolibarrModules $this->rights[5][3] = 0; $this->rights[5][4] = 'export'; + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports $r=0; diff --git a/htdocs/core/modules/modDon.class.php b/htdocs/core/modules/modDon.class.php index c62b46db06b..063c3b75b55 100644 --- a/htdocs/core/modules/modDon.class.php +++ b/htdocs/core/modules/modDon.class.php @@ -135,7 +135,12 @@ class modDon extends DolibarrModules $this->rights[3][2] = 'd'; $this->rights[3][3] = 0; $this->rights[3][4] = 'supprimer'; - + + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + } diff --git a/htdocs/core/modules/modDynamicPrices.class.php b/htdocs/core/modules/modDynamicPrices.class.php index 4e5cd3a3f62..cb6544f4d29 100644 --- a/htdocs/core/modules/modDynamicPrices.class.php +++ b/htdocs/core/modules/modDynamicPrices.class.php @@ -83,5 +83,6 @@ class modDynamicPrices extends DolibarrModules $this->rights = array(); $this->rights_class = 'dynamicprices'; $r=0; + } } diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index 8116186219d..7ac88137d71 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -218,6 +218,12 @@ class modExpedition extends DolibarrModules $this->rights[$r][4] = 'livraison'; $this->rights[$r][5] = 'supprimer'; + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports //-------- $r=0; diff --git a/htdocs/core/modules/modExpenseReport.class.php b/htdocs/core/modules/modExpenseReport.class.php index 01110a66bf3..36c921fc0d6 100644 --- a/htdocs/core/modules/modExpenseReport.class.php +++ b/htdocs/core/modules/modExpenseReport.class.php @@ -193,6 +193,12 @@ class modExpenseReport extends DolibarrModules $this->rights[5][3] = 0; $this->rights[5][4] = 'export'; + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports $r=0; diff --git a/htdocs/core/modules/modExport.class.php b/htdocs/core/modules/modExport.class.php index e8a6baa8509..007a349ca34 100644 --- a/htdocs/core/modules/modExport.class.php +++ b/htdocs/core/modules/modExport.class.php @@ -90,5 +90,11 @@ class modExport extends DolibarrModules $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'creer'; + + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + } } diff --git a/htdocs/core/modules/modFTP.class.php b/htdocs/core/modules/modFTP.class.php index e7388faaedf..a717a33e91b 100644 --- a/htdocs/core/modules/modFTP.class.php +++ b/htdocs/core/modules/modFTP.class.php @@ -107,10 +107,11 @@ class modFTP extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'write'; + // Menus - //------ - $this->menus = array(); // List of menus to add - $r=0; + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + // Top menu $this->menu[$r]=array('fk_menu'=>0, diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index d15215a4f99..07a13d7d532 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -184,6 +184,11 @@ class modFacture extends DolibarrModules $this->rights[$r][5] = 'export'; + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports //-------- $r=1; diff --git a/htdocs/core/modules/modFicheinter.class.php b/htdocs/core/modules/modFicheinter.class.php index 4c4fcbcc6d8..73008b69b08 100644 --- a/htdocs/core/modules/modFicheinter.class.php +++ b/htdocs/core/modules/modFicheinter.class.php @@ -147,6 +147,12 @@ class modFicheinter extends DolibarrModules $this->rights[$r][4] = 'ficheinter_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on $this->rights[$r][5] = 'unvalidate'; + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + //Exports //-------- $r=1; diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index 7d5d6752281..7917dd340c2 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -272,7 +272,12 @@ class modFournisseur extends DolibarrModules $this->rights[$r][5] = 'approve2'; } - + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports //-------- $r=0; diff --git a/htdocs/core/modules/modHRM.class.php b/htdocs/core/modules/modHRM.class.php index f370c78b25e..0ea2f745b80 100644 --- a/htdocs/core/modules/modHRM.class.php +++ b/htdocs/core/modules/modHRM.class.php @@ -125,9 +125,11 @@ class modHRM extends DolibarrModules $this->rights[$r][5] = 'export'; $r ++; - // Main menu entries - $this->menus = array (); // List of menus to add - $r = 0; + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + } /** diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index 73b316ec164..3e30eaf8629 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -173,10 +173,11 @@ class modHoliday extends DolibarrModules $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) $r++; - // Main menu entries - $this->menus = array(); // List of menus to add - $r=0; - + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + // Exports $r=1; diff --git a/htdocs/core/modules/modImport.class.php b/htdocs/core/modules/modImport.class.php index 8f3faad9bd1..2efebb58d80 100644 --- a/htdocs/core/modules/modImport.class.php +++ b/htdocs/core/modules/modImport.class.php @@ -85,5 +85,11 @@ class modImport extends DolibarrModules $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'run'; + + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + } } diff --git a/htdocs/core/modules/modLoan.class.php b/htdocs/core/modules/modLoan.class.php index b7e7f822bbc..7a4e7560219 100644 --- a/htdocs/core/modules/modLoan.class.php +++ b/htdocs/core/modules/modLoan.class.php @@ -135,7 +135,12 @@ class modLoan extends DolibarrModules $this->rights[$r][4] = 'export'; $this->rights[$r][5] = ''; - + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports //-------- $r=0; diff --git a/htdocs/core/modules/modMailing.class.php b/htdocs/core/modules/modMailing.class.php index 00ece509285..a8daad3f415 100644 --- a/htdocs/core/modules/modMailing.class.php +++ b/htdocs/core/modules/modMailing.class.php @@ -127,6 +127,10 @@ class modMailing extends DolibarrModules $this->rights[$r][4] = 'mailing_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on $this->rights[$r][5] = 'delete'; + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + } diff --git a/htdocs/core/modules/modMailmanSpip.class.php b/htdocs/core/modules/modMailmanSpip.class.php index 2ebff38ef08..3900c0549b9 100644 --- a/htdocs/core/modules/modMailmanSpip.class.php +++ b/htdocs/core/modules/modMailmanSpip.class.php @@ -76,5 +76,10 @@ class modMailmanSpip extends DolibarrModules // Permissions $this->rights = array(); $this->rights_class = 'clicktodial'; + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + } } diff --git a/htdocs/core/modules/modOpenSurvey.class.php b/htdocs/core/modules/modOpenSurvey.class.php index 02cf9138a1f..7cbfeb1e268 100644 --- a/htdocs/core/modules/modOpenSurvey.class.php +++ b/htdocs/core/modules/modOpenSurvey.class.php @@ -119,9 +119,9 @@ class modOpenSurvey extends DolibarrModules $r++; - // Main menu entries - $this->menus = array(); // List of menus to add - $r=0; + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. /* $this->menu[$r]=array( 'fk_menu'=>0, // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode 'type'=>'top', diff --git a/htdocs/core/modules/modPrelevement.class.php b/htdocs/core/modules/modPrelevement.class.php index 75e8410e19e..a422e4ea3d5 100644 --- a/htdocs/core/modules/modPrelevement.class.php +++ b/htdocs/core/modules/modPrelevement.class.php @@ -129,6 +129,11 @@ class modPrelevement extends DolibarrModules $this->rights[2][4] = 'bons'; $this->rights[2][5] = 'configurer'; */ + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + } diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index 154639f848d..409ca643dfa 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -124,6 +124,10 @@ class modProduct extends DolibarrModules $this->rights[$r][4] = 'export'; $r++; + // Menus + //------- + + $this->menu = 1; // This module add menu entries. They are coded into menu manager. /* We can't enable this here because it must be enabled in both product and service module and this create duplicate insert $r=0; $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode diff --git a/htdocs/core/modules/modProductBatch.class.php b/htdocs/core/modules/modProductBatch.class.php index ca0e2829819..9dbc8eb0212 100644 --- a/htdocs/core/modules/modProductBatch.class.php +++ b/htdocs/core/modules/modProductBatch.class.php @@ -95,10 +95,12 @@ class modProductBatch extends DolibarrModules $this->rights = array(); // Permission array used by this module $r=0; - // Main menu entries - $this->menu = array(); // List of menus to add - $r=0; - + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports $r=0; diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index 2d71eaba5a1..542a13c2288 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -203,6 +203,11 @@ class modProjet extends DolibarrModules $this->rights[$r][5] = 'supprimer'; + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + //Exports //-------- $r=1; diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index e9fe448baf7..975c65656b3 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -163,6 +163,12 @@ class modPropale extends DolibarrModules $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'export'; + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports //-------- $r=0; diff --git a/htdocs/core/modules/modResource.class.php b/htdocs/core/modules/modResource.class.php index 83476270bc5..f445992dbbb 100644 --- a/htdocs/core/modules/modResource.class.php +++ b/htdocs/core/modules/modResource.class.php @@ -196,6 +196,11 @@ class modResource extends DolibarrModules $r++; + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Add here list of permission defined by // an id, a label, a boolean and two constant strings. // Example: diff --git a/htdocs/core/modules/modSalaries.class.php b/htdocs/core/modules/modSalaries.class.php index 43742280465..a1f4753b12d 100644 --- a/htdocs/core/modules/modSalaries.class.php +++ b/htdocs/core/modules/modSalaries.class.php @@ -137,6 +137,11 @@ class modSalaries extends DolibarrModules $this->rights[$r][5] = ''; + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports //-------- $r=0; diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index 5ea2cfde964..5d9298a65ff 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -130,7 +130,12 @@ class modService extends DolibarrModules */ - // Exports + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + + // Exports //-------- $r=0; diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 4eac3c84c8a..50c7fc3c831 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -242,7 +242,12 @@ class modSociete extends DolibarrModules $this->rights[$r][4] = 'contact'; $this->rights[$r][5] = 'export'; - + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports //-------- $r=0; diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php index 778eb39e827..b2c2f806bd7 100644 --- a/htdocs/core/modules/modStock.class.php +++ b/htdocs/core/modules/modStock.class.php @@ -117,6 +117,12 @@ class modStock extends DolibarrModules $this->rights[4][4] = 'mouvement'; $this->rights[4][5] = 'creer'; + + // Menus + //------- + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports //-------- $r=0; diff --git a/htdocs/core/modules/modTax.class.php b/htdocs/core/modules/modTax.class.php index 293384b49a8..b5a23dd1377 100644 --- a/htdocs/core/modules/modTax.class.php +++ b/htdocs/core/modules/modTax.class.php @@ -117,6 +117,12 @@ class modTax extends DolibarrModules $this->rights[$r][5] = 'export'; + // Menus + //------- + + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports //-------- $r=0; diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php index 759b68555b7..911becc039b 100644 --- a/htdocs/core/modules/modUser.class.php +++ b/htdocs/core/modules/modUser.class.php @@ -202,6 +202,13 @@ class modUser extends DolibarrModules $this->rights[$r][4] = 'user'; $this->rights[$r][5] = 'export'; + + // Menus + //------- + + $this->menu = 1; // This module add menu entries. They are coded into menu manager. + + // Exports //-------- $r=0;