diff --git a/htdocs/core/modules/modLoan.class.php b/htdocs/core/modules/modLoan.class.php index 36919bc38af..f01391e16af 100644 --- a/htdocs/core/modules/modLoan.class.php +++ b/htdocs/core/modules/modLoan.class.php @@ -158,8 +158,6 @@ class modLoan extends DolibarrModules */ public function init($options = '') { - global $conf; - $result = $this->_load_tables('/install/mysql/', 'loan'); if ($result < 0) { return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default') diff --git a/htdocs/core/modules/modTakePos.class.php b/htdocs/core/modules/modTakePos.class.php index b06bf0fe8b0..ce6395fdb73 100644 --- a/htdocs/core/modules/modTakePos.class.php +++ b/htdocs/core/modules/modTakePos.class.php @@ -269,11 +269,16 @@ class modTakePos extends DolibarrModules dolibarr_set_const($db, "TAKEPOS_PRINT_METHOD", "browser", 'chaine', 0, '', $conf->entity); - $sql = array(); + $result = $this->_load_tables('/install/mysql/', 'takepos'); + if ($result < 0) { + return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default') + } - // Remove permissions and default values + // Clean before activation $this->remove($options); + $sql = array(); + return $this->_init($sql, $options); } diff --git a/htdocs/install/mysql/tables/llx_takepos_floor_tables.key.sql b/htdocs/install/mysql/tables/llx_takepos_floor_tables-takepos.key.sql similarity index 100% rename from htdocs/install/mysql/tables/llx_takepos_floor_tables.key.sql rename to htdocs/install/mysql/tables/llx_takepos_floor_tables-takepos.key.sql diff --git a/htdocs/install/mysql/tables/llx_takepos_floor_tables.sql b/htdocs/install/mysql/tables/llx_takepos_floor_tables-takepos.sql similarity index 100% rename from htdocs/install/mysql/tables/llx_takepos_floor_tables.sql rename to htdocs/install/mysql/tables/llx_takepos_floor_tables-takepos.sql