diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index 353de55db02..d94002a37b7 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -174,7 +174,6 @@ class modMyModule extends DolibarrModules // 'type'=>'top', // This is a Top menu entry // 'titre'=>'MyModule top menu', // 'mainmenu'=>'mymodule', - // 'leftmenu'=>'1', // Use 1 if you also want to add left menu entries using this descriptor. // 'url'=>'/mymodule/pagetop.php', // 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. // 'position'=>100, diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 0d20cd1f175..166bd664c10 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -48,7 +48,7 @@ class Menubase var $titre; var $langs; var $level; - var $leftmenu; //db->query($sql); - if (! $resqlrowidset) dol_print_error($this->db); + if (! $resqlrowidset) dol_print_error($this->db); } else dol_print_error($this->db); } @@ -468,9 +468,9 @@ class Menubase /** * Load entries found in database in a menu array. * - * @param array $newmenu Menu array to complete - * @param string $mainmenu Value for mainmenu that defined top menu of left menu - * @param string $myleftmenu Value that defined leftmenu + * @param array $newmenu Menu array to complete (in most cases, it's empty, may be already initialized with some menu manager like eldy) + * @param string $mainmenu Value for mainmenu that defines top menu of left menu + * @param string $myleftmenu Value that defines leftmenu * @param int $type_user 0=Internal,1=External,2=All * @param string $menu_handler Name of menu_handler used (auguria, eldy...) * @param array &$tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 493eb821e53..e78341b70fb 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -546,9 +546,9 @@ function print_end_menu_array() /** * Core function to output left menu eldy * - * @param db Database handler - * @param menu_array_before Table of menu entries to show before entries of menu handler - * @param menu_array_after Table of menu entries to show after entries of menu handler + * @param DoliDB $db Database handler + * @param array $menu_array_before Table of menu entries to show before entries of menu handler + * @param array $menu_array_after Table of menu entries to show after entries of menu handler */ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) { @@ -1324,7 +1324,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) } - // Affichage des menus personnalises + // Add personalized menus and modules menus require_once(DOL_DOCUMENT_ROOT."/core/class/menubase.class.php"); $tabMenu=array(); diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index 84c71c08134..d079205b492 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -168,7 +168,6 @@ class modAgenda extends DolibarrModules // 'type'=>'top', // This is a Top menu entry // 'titre'=>'MyModule top menu', // 'mainmenu'=>'mymodule', - // 'leftmenu'=>'1', // Use 1 if you also want to add left menu entries using this descriptor. // 'url'=>'/mymodule/pagetop.php', // 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. // 'position'=>100, @@ -181,7 +180,6 @@ class modAgenda extends DolibarrModules 'type'=>'top', 'titre'=>'Agenda', 'mainmenu'=>'agenda', - 'leftmenu'=>'1', // Use 1 if you also want to add left menu entries using this descriptor. 'url'=>'/comm/action/index.php', 'langs'=>'agenda', 'position'=>100, diff --git a/htdocs/core/modules/modCashDesk.class.php b/htdocs/core/modules/modCashDesk.class.php index ab299097588..f46cdfdca39 100644 --- a/htdocs/core/modules/modCashDesk.class.php +++ b/htdocs/core/modules/modCashDesk.class.php @@ -101,7 +101,6 @@ class modCashDesk extends DolibarrModules 'type'=>'top', // This is a Top menu entry 'titre'=>'CashDeskMenu', 'mainmenu'=>'cashdesk', - 'leftmenu'=>'1', // Use 1 if you also want to add left menu entries using this descriptor. Use 0 if left menu entries are defined in a file pre.inc.php (old school). 'url'=>'/cashdesk/index.php?user=__LOGIN__', 'langs'=>'cashdesk', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>100, diff --git a/htdocs/core/modules/modECM.class.php b/htdocs/core/modules/modECM.class.php index feae143c35a..84383255941 100644 --- a/htdocs/core/modules/modECM.class.php +++ b/htdocs/core/modules/modECM.class.php @@ -121,7 +121,6 @@ class modECM extends DolibarrModules 'type'=>'top', 'titre'=>'MenuECM', 'mainmenu'=>'ecm', - 'leftmenu'=>'1', // To say if we can overwrite leftmenu 'url'=>'/ecm/index.php', 'langs'=>'ecm', 'position'=>100, diff --git a/htdocs/core/modules/modExternalSite.class.php b/htdocs/core/modules/modExternalSite.class.php index 004b60a4c49..d29bef9cb24 100644 --- a/htdocs/core/modules/modExternalSite.class.php +++ b/htdocs/core/modules/modExternalSite.class.php @@ -102,7 +102,6 @@ class modExternalSite extends DolibarrModules 'type'=>'top', 'titre'=>'ExternalSites', 'mainmenu'=>'externalsite', - 'leftmenu'=>'1', 'url'=>'/externalsite/frames.php', 'langs'=>'other', 'position'=>100, diff --git a/htdocs/core/modules/modFTP.class.php b/htdocs/core/modules/modFTP.class.php index dcba440ad40..7976c1c9986 100644 --- a/htdocs/core/modules/modFTP.class.php +++ b/htdocs/core/modules/modFTP.class.php @@ -117,7 +117,6 @@ class modFTP extends DolibarrModules 'type'=>'top', 'titre'=>'FTP', 'mainmenu'=>'ftp', - 'leftmenu'=>'0', // Use 1 if you also want to add left menu entries using this descriptor. Use 0 if left menu entries are defined in a file pre.inc.php (old school). 'url'=>'/ftp/index.php', 'langs'=>'ftp', 'position'=>100, diff --git a/htdocs/core/modules/modGravatar.class.php b/htdocs/core/modules/modGravatar.class.php index fcf51da987d..8728440fcc6 100644 --- a/htdocs/core/modules/modGravatar.class.php +++ b/htdocs/core/modules/modGravatar.class.php @@ -126,7 +126,6 @@ class modGravatar extends DolibarrModules // 'type'=>'top', // This is a Top menu entry // 'titre'=>'MyModule top menu', // 'mainmenu'=>'mymodule', - // 'leftmenu'=>'1', // Use 1 if you also want to add left menu entries using this descriptor. Use 0 if left menu entries are defined in a file pre.inc.php (old school). // 'url'=>'/mymodule/pagetop.php', // 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. // 'position'=>100, diff --git a/htdocs/core/modules/modPaybox.class.php b/htdocs/core/modules/modPaybox.class.php index 92299a5b82f..60c9824a1fa 100644 --- a/htdocs/core/modules/modPaybox.class.php +++ b/htdocs/core/modules/modPaybox.class.php @@ -125,7 +125,6 @@ class modPayBox extends DolibarrModules // 'type'=>'top', // This is a Top menu entry // 'titre'=>'MyModule top menu', // 'mainmenu'=>'mymodule', - // 'leftmenu'=>'1', // Use 1 if you also want to add left menu entries using this descriptor. Use 0 if left menu entries are defined in a file pre.inc.php (old school). // 'url'=>'/mymodule/pagetop.php', // 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. // 'position'=>100, diff --git a/htdocs/core/modules/modPaypal.class.php b/htdocs/core/modules/modPaypal.class.php index b9589227a2e..1afb7c4d215 100644 --- a/htdocs/core/modules/modPaypal.class.php +++ b/htdocs/core/modules/modPaypal.class.php @@ -117,7 +117,6 @@ class modPaypal extends DolibarrModules // 'type'=>'top', // This is a Top menu entry // 'titre'=>'MyModule top menu', // 'mainmenu'=>'mymodule', - // 'leftmenu'=>'1', // Use 1 if you also want to add left menu entries using this descriptor. Use 0 if left menu entries are defined in a file pre.inc.php (old school). // 'url'=>'/mymodule/pagetop.php', // 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. // 'position'=>100, diff --git a/htdocs/core/modules/modWorkflow.class.php b/htdocs/core/modules/modWorkflow.class.php index d9965833c35..0f9bce6998b 100644 --- a/htdocs/core/modules/modWorkflow.class.php +++ b/htdocs/core/modules/modWorkflow.class.php @@ -115,7 +115,6 @@ class modWorkflow extends DolibarrModules 'type'=>'top', 'titre'=>'Workflow', 'mainmenu'=>'workflow', - 'leftmenu'=>'1', 'url'=>'/workflow/index.php', 'langs'=>'@workflow', 'position'=>100, @@ -149,7 +148,7 @@ class modWorkflow extends DolibarrModules { // Permissions $this->remove(); - + $sql = array(); return $this->_init($sql); diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql index 8bbd990bbac..0565d7b2e2e 100755 --- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql +++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql @@ -113,3 +113,5 @@ ALTER TABLE llx_societe MODIFY COLUMN fk_stcomm integer NOT NULL; ALTER TABLE llx_societe CHANGE COLUMN gencod barcode varchar(255); ALTER TABLE llx_societe ADD COLUMN fk_barcode_type integer DEFAULT 0; +UPDATE llx_menu SET leftmenu = NULL where leftmenu in ('', '0', '1'); +