diff --git a/htdocs/core/modules/modBanque.class.php b/htdocs/core/modules/modBanque.class.php index 0b00d208133..8d726d7121f 100644 --- a/htdocs/core/modules/modBanque.class.php +++ b/htdocs/core/modules/modBanque.class.php @@ -169,32 +169,35 @@ class modBanque extends DolibarrModules * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. * It also creates data directories. * - * @return int 1 if OK, 0 if KO - */ - function init() + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function init($options='') { global $conf; // Permissions - $this->remove(); + $this->remove($options); $sql = array(); - return $this->_init($sql); + return $this->_init($sql,$options); } /** - * Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted. - * - * @return int 1 if OK, 0 if KO + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO */ - function remove() - { + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> \ No newline at end of file diff --git a/htdocs/core/modules/modBarcode.class.php b/htdocs/core/modules/modBarcode.class.php index 823b0a4bfd7..662972212c3 100644 --- a/htdocs/core/modules/modBarcode.class.php +++ b/htdocs/core/modules/modBarcode.class.php @@ -99,29 +99,38 @@ class modBarcode extends DolibarrModules } - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. + /** + * Function called when module is enabled. + * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. + * It also creates data directories. + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO */ - function init() + function init($options='') { // Permissions - $this->remove(); + $this->remove($options); $sql = array(); - return $this->_init($sql); + return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modBookmark.class.php b/htdocs/core/modules/modBookmark.class.php index 4509242c973..ff29e9482c2 100644 --- a/htdocs/core/modules/modBookmark.class.php +++ b/htdocs/core/modules/modBookmark.class.php @@ -103,27 +103,35 @@ class modBookmark extends DolibarrModules } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + /** + * Function called when module is enabled. + * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. + * It also creates data directories. + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO */ - function init() - { - - $sql = array(); - - return $this->_init($sql); - } - - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() + function init($options='') { $sql = array(); - return $this->_remove($sql); + return $this->_init($sql,$options); } + + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { + $sql = array(); + + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modBoutique.class.php b/htdocs/core/modules/modBoutique.class.php index a22039055c5..3385a1bd26b 100644 --- a/htdocs/core/modules/modBoutique.class.php +++ b/htdocs/core/modules/modBoutique.class.php @@ -86,27 +86,35 @@ class modBoutique extends DolibarrModules $this->rights_class = 'boutique'; } - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - $sql = array(); - - return $this->_init($sql); - } - - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. + /** + * Function called when module is enabled. + * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. + * It also creates data directories. + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO */ - function remove() + function init($options='') { $sql = array(); - return $this->_remove($sql); + return $this->_init($sql,$options); } + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { + $sql = array(); + + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index 4ac2ef95805..b8243277af0 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -170,7 +170,7 @@ class modCategorie extends DolibarrModules function init($options='') { // Permissions - $this->remove(); + $this->remove($options); $sql = array(); @@ -178,17 +178,19 @@ class modCategorie extends DolibarrModules } /** - * Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted. - * @return int 1 if OK, 0 if KO + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO */ - function remove() - { + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } } ?> diff --git a/htdocs/core/modules/modClickToDial.class.php b/htdocs/core/modules/modClickToDial.class.php index 9470972b35e..d0194997e19 100644 --- a/htdocs/core/modules/modClickToDial.class.php +++ b/htdocs/core/modules/modClickToDial.class.php @@ -95,16 +95,19 @@ class modClickToDial extends DolibarrModules } /** - * \brief Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted. - * \return int 1 if OK, 0 if KO + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO */ - function remove() - { + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index 7dd86a69b31..eb6252af580 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -198,7 +198,7 @@ class modCommande extends DolibarrModules global $conf,$langs; // Permissions - $this->remove(); + $this->remove($options); //ODT template require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'); @@ -222,20 +222,20 @@ class modCommande extends DolibarrModules } - /** + /** * Function called when module is disabled. * Remove from database constants, boxes and permissions from Dolibarr database. * Data directories are not deleted * * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO - */ - function remove() - { + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); + return $this->_remove($sql,$options); + } - } } ?> diff --git a/htdocs/core/modules/modComptabilite.class.php b/htdocs/core/modules/modComptabilite.class.php index 9a18a57c600..dbdf75918c8 100644 --- a/htdocs/core/modules/modComptabilite.class.php +++ b/htdocs/core/modules/modComptabilite.class.php @@ -134,23 +134,27 @@ class modComptabilite extends DolibarrModules global $conf; // Nettoyage avant activation - $this->remove(); + $this->remove($options); $sql = array(); return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } } ?> diff --git a/htdocs/core/modules/modContrat.class.php b/htdocs/core/modules/modContrat.class.php index d5c7d8a087c..d522cb4a79d 100644 --- a/htdocs/core/modules/modContrat.class.php +++ b/htdocs/core/modules/modContrat.class.php @@ -131,23 +131,27 @@ class modContrat extends DolibarrModules global $conf; // Nettoyage avant activation - $this->remove(); + $this->remove($options); $sql = array(); return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); + return $this->_remove($sql,$options); + } - } } ?> diff --git a/htdocs/core/modules/modDeplacement.class.php b/htdocs/core/modules/modDeplacement.class.php index e741d0add17..1e73b54a1ea 100644 --- a/htdocs/core/modules/modDeplacement.class.php +++ b/htdocs/core/modules/modDeplacement.class.php @@ -144,23 +144,27 @@ class modDeplacement extends DolibarrModules function init($options='') { // Permissions - $this->remove(); + $this->remove($options); $sql = array(); return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); + return $this->_remove($sql,$options); + } - } } ?> diff --git a/htdocs/core/modules/modDocument.class.php b/htdocs/core/modules/modDocument.class.php index 94110b388be..2a6b9c63d1e 100644 --- a/htdocs/core/modules/modDocument.class.php +++ b/htdocs/core/modules/modDocument.class.php @@ -110,7 +110,7 @@ class modDocument extends DolibarrModules global $conf; // Permissions - $this->remove(); + $this->remove($options); $sql = array(); @@ -118,15 +118,20 @@ class modDocument extends DolibarrModules } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modDon.class.php b/htdocs/core/modules/modDon.class.php index 8c1fd75598c..9899a800fba 100644 --- a/htdocs/core/modules/modDon.class.php +++ b/htdocs/core/modules/modDon.class.php @@ -125,15 +125,20 @@ class modDon extends DolibarrModules return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modECM.class.php b/htdocs/core/modules/modECM.class.php index b70a9a57a27..14b256d53f4 100644 --- a/htdocs/core/modules/modECM.class.php +++ b/htdocs/core/modules/modECM.class.php @@ -200,17 +200,20 @@ class modECM extends DolibarrModules return $this->_init($sql,$options); } - /** - * \brief Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted. - */ - function remove() - { - $sql = array(); + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { + $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } } diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index 64f0ff0888e..235c80e873f 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -204,7 +204,7 @@ class modExpedition extends DolibarrModules global $conf; // Permissions - $this->remove(); + $this->remove($options); $sql = array(); @@ -218,15 +218,20 @@ class modExpedition extends DolibarrModules return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modExport.class.php b/htdocs/core/modules/modExport.class.php index 9999ba9d5ca..9ff4f9662a4 100644 --- a/htdocs/core/modules/modExport.class.php +++ b/htdocs/core/modules/modExport.class.php @@ -106,15 +106,20 @@ class modExport extends DolibarrModules return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modExternalRss.class.php b/htdocs/core/modules/modExternalRss.class.php index 9ad8a6e9f90..dcbcf9e63d5 100644 --- a/htdocs/core/modules/modExternalRss.class.php +++ b/htdocs/core/modules/modExternalRss.class.php @@ -119,18 +119,23 @@ class modExternalRss extends DolibarrModules return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - - // Supprime anciennes delcarations de la boite RSS + + // Delete old declarations of RSS box $this->boxes[0][1] = "box_external_rss.php"; + + return $this->_remove($sql,$options); + } - return $this->_remove($sql); - } } ?> diff --git a/htdocs/core/modules/modExternalSite.class.php b/htdocs/core/modules/modExternalSite.class.php index 7b7ec8307b4..bf9e18421a4 100644 --- a/htdocs/core/modules/modExternalSite.class.php +++ b/htdocs/core/modules/modExternalSite.class.php @@ -129,17 +129,20 @@ class modExternalSite extends DolibarrModules return $this->_init($sql,$options); } - /** - * \brief Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted. - */ - function remove() - { - $sql = array(); + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { + $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } } diff --git a/htdocs/core/modules/modFTP.class.php b/htdocs/core/modules/modFTP.class.php index e6f5c6ddd60..4b28a956481 100644 --- a/htdocs/core/modules/modFTP.class.php +++ b/htdocs/core/modules/modFTP.class.php @@ -142,17 +142,20 @@ class modFTP extends DolibarrModules return $this->_init($sql,$options); } - /** - * \brief Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted. - */ - function remove() - { - $sql = array(); + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { + $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } } diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index 227c8240bb6..574cbfd47d9 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -237,16 +237,20 @@ class modFacture extends DolibarrModules return $this->_init($sql,$options); } - /** - * Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - * @param options Options when disabling module - */ - function remove($options='') - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); return $this->_remove($sql,$options); - } + } + } ?> diff --git a/htdocs/core/modules/modFckeditor.class.php b/htdocs/core/modules/modFckeditor.class.php index 53177eefee9..93347807f8d 100644 --- a/htdocs/core/modules/modFckeditor.class.php +++ b/htdocs/core/modules/modFckeditor.class.php @@ -97,15 +97,20 @@ class modFckeditor extends DolibarrModules return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modFicheinter.class.php b/htdocs/core/modules/modFicheinter.class.php index ec22e3760df..2eb7fcedc02 100644 --- a/htdocs/core/modules/modFicheinter.class.php +++ b/htdocs/core/modules/modFicheinter.class.php @@ -164,7 +164,7 @@ class modFicheinter extends DolibarrModules global $conf; // Permissions - $this->remove(); + $this->remove($options); $sql = array( "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity, @@ -175,14 +175,19 @@ class modFicheinter extends DolibarrModules } /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO */ - function remove() + function remove($options='') { - $sql = array(); + $sql = array(); - return $this->_remove($sql); + return $this->_remove($sql,$options); } + } ?> diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index a4f1547c2bd..3bfd85974a6 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -270,7 +270,7 @@ class modFournisseur extends DolibarrModules { global $conf; - $this->remove(); + $this->remove($options); $sql = array( "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity, @@ -280,16 +280,20 @@ class modFournisseur extends DolibarrModules return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } } ?> diff --git a/htdocs/core/modules/modGeoIPMaxmind.class.php b/htdocs/core/modules/modGeoIPMaxmind.class.php index fa49c845bc8..e6b04d4652c 100644 --- a/htdocs/core/modules/modGeoIPMaxmind.class.php +++ b/htdocs/core/modules/modGeoIPMaxmind.class.php @@ -101,15 +101,20 @@ class modGeoIPMaxmind extends DolibarrModules return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modGravatar.class.php b/htdocs/core/modules/modGravatar.class.php index dd54452ce44..80b83577058 100644 --- a/htdocs/core/modules/modGravatar.class.php +++ b/htdocs/core/modules/modGravatar.class.php @@ -197,26 +197,29 @@ class modGravatar extends DolibarrModules return $this->_init($sql,$options); } - /** - * \brief Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted. - * \return int 1 if OK, 0 if KO - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } /** - * \brief Create tables, keys and data required by module - * Files llx_table1.sql, llx_table1.key.sql llx_data.sql with create table, create keys - * and create data commands must be stored in directory /mymodule/sql/ - * This function is called by this->init. - * \return int <=0 if KO, >0 if OK + * Create tables, keys and data required by module + * Files llx_table1.sql, llx_table1.key.sql llx_data.sql with create table, create keys + * and create data commands must be stored in directory /mymodule/sql/ + * This function is called by this->init. + * + * @return int <=0 if KO, >0 if OK */ function load_tables() { diff --git a/htdocs/core/modules/modImport.class.php b/htdocs/core/modules/modImport.class.php index 0fe04143c05..acb905116b5 100644 --- a/htdocs/core/modules/modImport.class.php +++ b/htdocs/core/modules/modImport.class.php @@ -101,15 +101,20 @@ class modImport extends DolibarrModules return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modLabel.class.php b/htdocs/core/modules/modLabel.class.php index 3a4b47c8cb5..29eb657b20c 100644 --- a/htdocs/core/modules/modLabel.class.php +++ b/htdocs/core/modules/modLabel.class.php @@ -103,22 +103,27 @@ class modLabel extends DolibarrModules function init($options='') { // Permissions - $this->remove(); + $this->remove($options); $sql = array(); return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modLdap.class.php b/htdocs/core/modules/modLdap.class.php index f27b5f9adfe..2aad6dfe570 100644 --- a/htdocs/core/modules/modLdap.class.php +++ b/htdocs/core/modules/modLdap.class.php @@ -107,15 +107,20 @@ class modLdap extends DolibarrModules return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modMailing.class.php b/htdocs/core/modules/modMailing.class.php index d3b54ce9fa1..bcc0f77a568 100644 --- a/htdocs/core/modules/modMailing.class.php +++ b/htdocs/core/modules/modMailing.class.php @@ -113,22 +113,27 @@ class modMailing extends DolibarrModules function init($options='') { // Permissions - $this->remove(); + $this->remove($options); $sql = array(); return $this->_init($sql,$options); } - /** - \brief Fonction appelee lors de la desactivation d'un module. - Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modMailmanSpip.class.php b/htdocs/core/modules/modMailmanSpip.class.php index 651d8e6116d..34ef90f5a2e 100644 --- a/htdocs/core/modules/modMailmanSpip.class.php +++ b/htdocs/core/modules/modMailmanSpip.class.php @@ -95,16 +95,19 @@ class modMailmanSpip extends DolibarrModules } /** - * \brief Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted. - * \return int 1 if OK, 0 if KO + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO */ - function remove() - { + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modNotification.class.php b/htdocs/core/modules/modNotification.class.php index 210f75bbd07..f76a5aa4f7a 100644 --- a/htdocs/core/modules/modNotification.class.php +++ b/htdocs/core/modules/modNotification.class.php @@ -86,22 +86,27 @@ class modNotification extends DolibarrModules function init($options='') { // Permissions - $this->remove(); + $this->remove($options); $sql = array(); return $this->_init($sql,$options); } - /** - \brief Fonction appelee lors de la desactivation d'un module. - Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modPaybox.class.php b/htdocs/core/modules/modPaybox.class.php index 22dee45c8ff..f59d9841629 100644 --- a/htdocs/core/modules/modPaybox.class.php +++ b/htdocs/core/modules/modPaybox.class.php @@ -194,25 +194,27 @@ class modPayBox extends DolibarrModules } /** - * \brief Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted. - * \return int 1 if OK, 0 if KO + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO */ - function remove() + function remove($options='') { - $sql = array(); + $sql = array(); - return $this->_remove($sql); + return $this->_remove($sql,$options); } - /** - * \brief Create tables and keys required by module - * Files mymodule.sql and mymodule.key.sql with create table and create keys - * commands must be stored in directory /mymodule/sql/ - * This function is called by this->init. - * \return int <=0 if KO, >0 if OK + * Create tables and keys required by module + * Files mymodule.sql and mymodule.key.sql with create table and create keys + * commands must be stored in directory /mymodule/sql/ + * This function is called by this->init. + * + * @return int <=0 if KO, >0 if OK */ function load_tables() { diff --git a/htdocs/core/modules/modPaypal.class.php b/htdocs/core/modules/modPaypal.class.php index 308664136de..94d2b81865e 100644 --- a/htdocs/core/modules/modPaypal.class.php +++ b/htdocs/core/modules/modPaypal.class.php @@ -186,25 +186,28 @@ class modPaypal extends DolibarrModules } /** - * \brief Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted. - * \return int 1 if OK, 0 if KO + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO */ - function remove() + function remove($options='') { - $sql = array(); + $sql = array(); - return $this->_remove($sql); + return $this->_remove($sql,$options); } /** - * \brief Create tables and keys required by module - * Files mymodule.sql and mymodule.key.sql with create table and create keys - * commands must be stored in directory /mymodule/sql/ - * This function is called by this->init. - * \return int <=0 if KO, >0 if OK + * Create tables and keys required by module + * Files mymodule.sql and mymodule.key.sql with create table and create keys + * commands must be stored in directory /mymodule/sql/ + * This function is called by this->init. + * + * @return int <=0 if KO, >0 if OK */ function load_tables() { diff --git a/htdocs/core/modules/modPrelevement.class.php b/htdocs/core/modules/modPrelevement.class.php index 30ea097ca75..8f440508b81 100644 --- a/htdocs/core/modules/modPrelevement.class.php +++ b/htdocs/core/modules/modPrelevement.class.php @@ -136,23 +136,27 @@ class modPrelevement extends DolibarrModules global $conf; // Permissions - $this->remove(); + $this->remove($options); $sql = array(); return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } } ?> diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index c156fb0df3c..46422f817fb 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -202,22 +202,27 @@ class modProduct extends DolibarrModules function init($options='') { // Permissions - $this->remove(); + $this->remove($options); $sql = array(); return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index 1e8927490d7..76b1628e68f 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -152,7 +152,7 @@ class modProjet extends DolibarrModules global $conf; // Permissions - $this->remove(); + $this->remove($options); $sql = array( "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity, @@ -162,15 +162,20 @@ class modProjet extends DolibarrModules return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index 091c7fb2eac..4d90489d4cc 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -193,7 +193,7 @@ class modPropale extends DolibarrModules global $conf,$langs; // Remove permissions and default values - $this->remove(); + $this->remove($options); //ODT template require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'); @@ -217,16 +217,20 @@ class modPropale extends DolibarrModules } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); + return $this->_remove($sql,$options); + } - } } ?> diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index d318b62046f..830a1ccf93a 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -188,22 +188,27 @@ class modService extends DolibarrModules function init($options='') { // Permissions et valeurs par defaut - $this->remove(); + $this->remove($options); $sql = array(); return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index c96bd6beb0f..4b11de2943b 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -345,16 +345,19 @@ class modSociete extends DolibarrModules } /** - * Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted. - * @return int 1 if OK, 0 if KO + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO */ - function remove($options='') - { + function remove($options='') + { $sql = array(); return $this->_remove($sql,$options); - } + } + } ?> diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php index d9a9e7671ff..590e63d7ced 100644 --- a/htdocs/core/modules/modStock.class.php +++ b/htdocs/core/modules/modStock.class.php @@ -147,16 +147,20 @@ class modStock extends DolibarrModules return $this->_init($sql,$options); } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); + return $this->_remove($sql,$options); + } - } } ?> diff --git a/htdocs/core/modules/modSyslog.class.php b/htdocs/core/modules/modSyslog.class.php index f1e70434f7a..9dffdf35e70 100644 --- a/htdocs/core/modules/modSyslog.class.php +++ b/htdocs/core/modules/modSyslog.class.php @@ -99,15 +99,20 @@ class modSyslog extends DolibarrModules } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modTax.class.php b/htdocs/core/modules/modTax.class.php index 0b2dbd11328..66f07f9a31e 100644 --- a/htdocs/core/modules/modTax.class.php +++ b/htdocs/core/modules/modTax.class.php @@ -151,24 +151,27 @@ class modTax extends DolibarrModules global $conf; // Nettoyage avant activation - $this->remove(); + $this->remove($options); $sql = array(); return $this->_init($sql,$options); } - /** - * Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted * - * @return int 1 if OK, 0 if KO - */ - function remove() - { + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php index 6a577ac8497..354ed76f818 100644 --- a/htdocs/core/modules/modUser.class.php +++ b/htdocs/core/modules/modUser.class.php @@ -236,7 +236,7 @@ class modUser extends DolibarrModules global $conf; // Permissions - $this->remove(); + $this->remove($options); $sql = array(); @@ -244,17 +244,19 @@ class modUser extends DolibarrModules } /** - * Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted. - * - * @return int 1 if OK, 0 if KO + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO */ - function remove() - { + function remove($options='') + { $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql,$options); + } + } ?> diff --git a/htdocs/core/modules/modWebServices.class.php b/htdocs/core/modules/modWebServices.class.php index 9469866bc2a..a28d253f03a 100644 --- a/htdocs/core/modules/modWebServices.class.php +++ b/htdocs/core/modules/modWebServices.class.php @@ -107,15 +107,18 @@ class modWebServices extends DolibarrModules } /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - * \param options Options when disabling module + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO */ function remove($options='') { - $sql = array(); + $sql = array(); - return $this->_remove($sql,$options); + return $this->_remove($sql,$options); } } diff --git a/htdocs/core/modules/modWorkflow.class.php b/htdocs/core/modules/modWorkflow.class.php index 61676262cce..f2cff187233 100644 --- a/htdocs/core/modules/modWorkflow.class.php +++ b/htdocs/core/modules/modWorkflow.class.php @@ -145,7 +145,7 @@ class modWorkflow extends DolibarrModules function init($options='') { // Permissions - $this->remove(); + $this->remove($options); $sql = array(); @@ -153,20 +153,25 @@ class modWorkflow extends DolibarrModules } /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO */ - function remove() + function remove($options='') { - $sql = array(); + $sql = array(); - return $this->_remove($sql); + return $this->_remove($sql,$options); } /** - * \brief Create tables and keys required by module - * This function is called by this->init. - * \return int <=0 if KO, >0 if OK + * Create tables and keys required by module + * This function is called by this->init. + * + * @return int <=0 if KO, >0 if OK */ function load_tables() { diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index febfae62f18..c7c271c2a13 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -3518,7 +3518,7 @@ function migrate_reload_modules($db,$langs,$conf) if ($res) { $mod=new modProduct($db); //$mod->remove('noboxes'); - $mod->init(); + $mod->init('noboxes'); } } if (! empty($conf->global->MAIN_MODULE_SERVICE)) // Permission has changed into 2.7 @@ -3528,7 +3528,7 @@ function migrate_reload_modules($db,$langs,$conf) $res=@include_once(DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php'); $mod=new modService($db); //$mod->remove('noboxes'); - $mod->init(); + $mod->init('noboxes'); } } if (! empty($conf->global->MAIN_MODULE_COMMANDE)) // Permission has changed into 2.9 @@ -3538,7 +3538,7 @@ function migrate_reload_modules($db,$langs,$conf) $res=@include_once(DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php'); $mod=new modCommande($db); //$mod->remove('noboxes'); - $mod->init(); + $mod->init('noboxes'); } } if (! empty($conf->global->MAIN_MODULE_FACTURE)) // Permission has changed into 2.9 @@ -3548,7 +3548,7 @@ function migrate_reload_modules($db,$langs,$conf) $res=@include_once(DOL_DOCUMENT_ROOT.'/core/modules/modFacture.class.php'); $mod=new modFacture($db); //$mod->remove('noboxes'); - $mod->init(); + $mod->init('noboxes'); } } if (! empty($conf->global->MAIN_MODULE_FOURNISSEUR)) // Permission has changed into 2.9 @@ -3558,7 +3558,7 @@ function migrate_reload_modules($db,$langs,$conf) if ($res) { $mod=new modFournisseur($db); //$mod->remove('noboxes'); - $mod->init(); + $mod->init('noboxes'); } } @@ -3569,7 +3569,7 @@ function migrate_reload_modules($db,$langs,$conf) if ($res) { $mod=new modUser($db); //$mod->remove('noboxes'); // We need to remove because id of module has changed - $mod->init(); + $mod->init('noboxes'); } } if (! empty($conf->global->MAIN_MODULE_DEPLACEMENT)) // Permission has changed into 3.0 @@ -3579,7 +3579,7 @@ function migrate_reload_modules($db,$langs,$conf) if ($res) { $mod=new modDeplacement($db); //$mod->remove('noboxes'); // We need to remove because a permission id has been removed - $mod->init(); + $mod->init('noboxes'); } } if (! empty($conf->global->MAIN_MODULE_DON)) // Permission has changed into 3.0 @@ -3589,7 +3589,7 @@ function migrate_reload_modules($db,$langs,$conf) if ($res) { $mod=new modDon($db); //$mod->remove('noboxes'); // We need to remove because a permission id has been removed - $mod->init(); + $mod->init('noboxes'); } } if (! empty($conf->global->MAIN_MODULE_ECM)) // Permission has changed into 3.0 and 3.1 @@ -3599,7 +3599,7 @@ function migrate_reload_modules($db,$langs,$conf) $res=@include_once(DOL_DOCUMENT_ROOT.'/core/modules/modECM.class.php'); $mod=new modECM($db); $mod->remove('noboxes'); // We need to remove because a permission id has been removed - $mod->init(); + $mod->init('noboxes'); } } if (! empty($conf->global->MAIN_MODULE_PAYBOX)) // Permission has changed into 3.0 @@ -3609,7 +3609,7 @@ function migrate_reload_modules($db,$langs,$conf) if ($res) { $mod=new modPaybox($db); $mod->remove('noboxes'); // We need to remove because id of module has changed - $mod->init(); + $mod->init('noboxes'); } }