From 419b225120e3fdce83510bbdfb565cb4714c3eda Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 7 Apr 2018 21:11:58 +0200 Subject: [PATCH] Clean code --- htdocs/core/modules/modCron.class.php | 14 +++++++------- htdocs/install/mysql/migration/7.0.0-8.0.0.sql | 3 +++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/htdocs/core/modules/modCron.class.php b/htdocs/core/modules/modCron.class.php index 2ce3cf9d9f6..9ffe92699d7 100644 --- a/htdocs/core/modules/modCron.class.php +++ b/htdocs/core/modules/modCron.class.php @@ -64,17 +64,17 @@ class modCron extends DolibarrModules //------------- $this->config_page_url = array("cron.php@cron"); - // Dependancies - //------------- + // Dependancies + //------------- $this->hidden = !empty($conf->global->MODULE_CRON_DISABLED); // A condition to disable module $this->depends = array(); // List of modules id that must be enabled if this module is enabled - $this->requiredby = array(); // List of modules id to disable if this one is disabled + $this->requiredby = array(); // List of modules id to disable if this one is disabled $this->conflictwith = array(); // List of modules id this module is in conflict with - $this->langfiles = array("cron"); + $this->langfiles = array("cron"); - // Constants - //----------- - $this->const = array( + // Constants + //----------- + $this->const = array( 0=>array( 'CRON_KEY', 'chaine', diff --git a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql index c9ef9ff828d..2024a6b68e2 100644 --- a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql +++ b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql @@ -49,6 +49,9 @@ ALTER TABLE llx_inventory ADD COLUMN import_key varchar(14); -- For 8.0 +-- delete old permission no more used +DELETE FROM llx_rights_def WHERE perms = 'main' and module = 'commercial'; + delete from llx_rights_def where perms IS NULL; delete from llx_user_rights where fk_user not IN (select rowid from llx_user); delete from llx_usergroup_rights where fk_usergroup not in (select rowid from llx_usergroup);