From eff573e753ac1a061951ab0b59236ea3a762ebd7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?=
 <marcosgdf@gmail.com>
Date: Tue, 7 Jul 2015 13:06:56 +0200
Subject: [PATCH] Removed duplicated code from core modules

---
 htdocs/core/modules/modAccounting.class.php   | 31 ----------------
 htdocs/core/modules/modAdherent.class.php     | 33 -----------------
 htdocs/core/modules/modAgenda.class.php       | 35 -------------------
 htdocs/core/modules/modApi.class.php          | 16 ---------
 .../modules/modAskPriceSupplier.class.php     | 16 ---------
 htdocs/core/modules/modBanque.class.php       | 16 ---------
 htdocs/core/modules/modBarcode.class.php      | 16 ---------
 htdocs/core/modules/modBookmark.class.php     | 31 ----------------
 htdocs/core/modules/modCashDesk.class.php     | 16 ---------
 htdocs/core/modules/modCategorie.class.php    | 16 ---------
 htdocs/core/modules/modClickToDial.class.php  | 33 -----------------
 htdocs/core/modules/modCommande.class.php     | 17 ---------
 htdocs/core/modules/modComptabilite.class.php | 16 ---------
 htdocs/core/modules/modContrat.class.php      | 16 ---------
 htdocs/core/modules/modCron.class.php         | 35 -------------------
 htdocs/core/modules/modDeplacement.class.php  | 16 ---------
 .../modules/modDocumentGeneration.class.php   | 17 ---------
 htdocs/core/modules/modDon.class.php          | 16 ---------
 .../core/modules/modDynamicPrices.class.php   | 35 -------------------
 htdocs/core/modules/modECM.class.php          | 31 ----------------
 htdocs/core/modules/modExpedition.class.php   | 16 ---------
 .../core/modules/modExpenseReport.class.php   | 15 --------
 htdocs/core/modules/modExport.class.php       | 31 ----------------
 htdocs/core/modules/modExternalSite.class.php | 31 ----------------
 htdocs/core/modules/modFTP.class.php          | 31 ----------------
 htdocs/core/modules/modFacture.class.php      | 16 ---------
 htdocs/core/modules/modFckeditor.class.php    | 33 -----------------
 htdocs/core/modules/modFicheinter.class.php   | 16 ---------
 htdocs/core/modules/modFournisseur.class.php  | 16 ---------
 htdocs/core/modules/modGeoIPMaxmind.class.php | 31 ----------------
 htdocs/core/modules/modGravatar.class.php     | 33 -----------------
 htdocs/core/modules/modHoliday.class.php      | 31 ----------------
 htdocs/core/modules/modImport.class.php       | 31 ----------------
 htdocs/core/modules/modIncoterm.class.php     | 30 ----------------
 htdocs/core/modules/modLabel.class.php        | 17 ---------
 htdocs/core/modules/modLdap.class.php         | 31 ----------------
 htdocs/core/modules/modLoan.class.php         | 16 ---------
 htdocs/core/modules/modMailing.class.php      | 16 ---------
 htdocs/core/modules/modMailmanSpip.class.php  | 33 -----------------
 htdocs/core/modules/modMargin.class.php       | 31 ----------------
 htdocs/core/modules/modNotification.class.php | 16 ---------
 htdocs/core/modules/modOpenSurvey.class.php   | 15 --------
 htdocs/core/modules/modPaybox.class.php       | 33 -----------------
 htdocs/core/modules/modPaypal.class.php       | 33 -----------------
 htdocs/core/modules/modPrelevement.class.php  | 16 ---------
 htdocs/core/modules/modPrinting.class.php     | 31 ----------------
 htdocs/core/modules/modProduct.class.php      | 16 ---------
 htdocs/core/modules/modProductBatch.class.php | 16 ---------
 htdocs/core/modules/modProjet.class.php       | 16 ---------
 htdocs/core/modules/modPropale.class.php      | 16 ---------
 htdocs/core/modules/modResource.class.php     | 15 --------
 htdocs/core/modules/modSalaries.class.php     | 16 ---------
 htdocs/core/modules/modService.class.php      | 16 ---------
 htdocs/core/modules/modSkype.class.php        | 35 -------------------
 htdocs/core/modules/modSociete.class.php      | 16 ---------
 htdocs/core/modules/modStock.class.php        | 31 ----------------
 .../modSyncSupplierWebServices.class.php      | 35 -------------------
 htdocs/core/modules/modSyslog.class.php       | 33 -----------------
 htdocs/core/modules/modTax.class.php          | 16 ---------
 htdocs/core/modules/modUser.class.php         | 16 ---------
 htdocs/core/modules/modWebServices.class.php  | 35 -------------------
 htdocs/core/modules/modWorkflow.class.php     | 16 ---------
 62 files changed, 1451 deletions(-)

diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php
index 84e18048e84..7b7a9dd4517 100644
--- a/htdocs/core/modules/modAccounting.class.php
+++ b/htdocs/core/modules/modAccounting.class.php
@@ -272,35 +272,4 @@ class modAccounting extends DolibarrModules
 		$this->menus = array();
 		$r = 0;
 	}
-
-    /**
-	 *		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($options='')
-    {
-
-        $sql = array();
-
-        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/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php
index c897be729ec..1090e8b6939 100644
--- a/htdocs/core/modules/modAdherent.class.php
+++ b/htdocs/core/modules/modAdherent.class.php
@@ -230,37 +230,4 @@ class modAdherent extends DolibarrModules
 		$this->import_regex_array[$r]=array('a.civility'=>'code@'.MAIN_DB_PREFIX.'c_civility','a.fk_adherent_type'=>'rowid@'.MAIN_DB_PREFIX.'adherent_type','a.morphy'=>'(phy|mor)','a.statut'=>'^[0|1]','a.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','a.datefin'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
         $this->import_examplevalues_array[$r]=array('a.civility'=>"MR",'a.lastname'=>'Smith','a.firstname'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.zip'=>'55000','a.town'=>'New York','a.country'=>'1','a.email'=>'jsmith@example.com','a.birth'=>'1972-10-10','a.statut'=>"0 or 1",'a.note_public'=>"This is a public comment on member",'a.note_private'=>"This is private comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d'));
     }
-
-
-    /**
-	 *		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($options='')
-    {
-
-        $sql = array();
-
-        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/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php
index c6492ab5161..3119553f677 100644
--- a/htdocs/core/modules/modAgenda.class.php
+++ b/htdocs/core/modules/modAgenda.class.php
@@ -399,39 +399,4 @@ class modAgenda extends DolibarrModules
 		$this->export_sql_end[$r] .=' ORDER BY ac.datep';
 
 	}
-
-
-	/**
-	 *		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($options='')
-	{
-		// Prevent pb of modules not correctly disabled
-		//$this->remove($options);
-
-		$sql = array();
-
-		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/modApi.class.php b/htdocs/core/modules/modApi.class.php
index 2bdcbe03c54..5e0e825d1e0 100644
--- a/htdocs/core/modules/modApi.class.php
+++ b/htdocs/core/modules/modApi.class.php
@@ -232,21 +232,5 @@ class modApi extends DolibarrModules
 
 		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/modAskPriceSupplier.class.php b/htdocs/core/modules/modAskPriceSupplier.class.php
index 371f2c9f214..23d4fb20f42 100644
--- a/htdocs/core/modules/modAskPriceSupplier.class.php
+++ b/htdocs/core/modules/modAskPriceSupplier.class.php
@@ -221,20 +221,4 @@ class modAskPriceSupplier extends DolibarrModules
 
 		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);
-    }
-
 }
\ No newline at end of file
diff --git a/htdocs/core/modules/modBanque.class.php b/htdocs/core/modules/modBanque.class.php
index df698b26a90..9222a38ff26 100644
--- a/htdocs/core/modules/modBanque.class.php
+++ b/htdocs/core/modules/modBanque.class.php
@@ -209,20 +209,4 @@ class modBanque extends DolibarrModules
 
 		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/modBarcode.class.php b/htdocs/core/modules/modBarcode.class.php
index 0d06c1657c2..4ee6084aaf6 100644
--- a/htdocs/core/modules/modBarcode.class.php
+++ b/htdocs/core/modules/modBarcode.class.php
@@ -146,20 +146,4 @@ class modBarcode extends DolibarrModules
 
 		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/modBookmark.class.php b/htdocs/core/modules/modBookmark.class.php
index 587429aa830..a6585e14d54 100644
--- a/htdocs/core/modules/modBookmark.class.php
+++ b/htdocs/core/modules/modBookmark.class.php
@@ -99,35 +99,4 @@ class modBookmark extends DolibarrModules
 		$this->rights[$r][4] = 'supprimer';
 
 	}
-
-    /**
-     *      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($options='')
-	{
-		$sql = array();
-
-		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/modCashDesk.class.php b/htdocs/core/modules/modCashDesk.class.php
index d6deb4ab51f..9b256162597 100644
--- a/htdocs/core/modules/modCashDesk.class.php
+++ b/htdocs/core/modules/modCashDesk.class.php
@@ -139,20 +139,4 @@ class modCashDesk extends DolibarrModules
 
     	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
-     *  @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 b64c9671a99..e9efbcbe732 100644
--- a/htdocs/core/modules/modCategorie.class.php
+++ b/htdocs/core/modules/modCategorie.class.php
@@ -363,20 +363,4 @@ class modCategorie extends DolibarrModules
 
 		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/modClickToDial.class.php b/htdocs/core/modules/modClickToDial.class.php
index 872700c1817..518cafa35a4 100644
--- a/htdocs/core/modules/modClickToDial.class.php
+++ b/htdocs/core/modules/modClickToDial.class.php
@@ -74,37 +74,4 @@ class modClickToDial extends DolibarrModules
 		$this->rights = array();
 		$this->rights_class = 'clicktodial';
 	}
-
-    /**
-	 *		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($options='')
-	{
-		global $conf;
-
-		$sql = array();
-
-		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/modCommande.class.php b/htdocs/core/modules/modCommande.class.php
index 03b1a6d964b..4289bd54932 100644
--- a/htdocs/core/modules/modCommande.class.php
+++ b/htdocs/core/modules/modCommande.class.php
@@ -237,21 +237,4 @@ class modCommande extends DolibarrModules
 
 		 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 ('', 'newboxdefonly', '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/modComptabilite.class.php b/htdocs/core/modules/modComptabilite.class.php
index 74002f0065f..e23a04ce548 100644
--- a/htdocs/core/modules/modComptabilite.class.php
+++ b/htdocs/core/modules/modComptabilite.class.php
@@ -115,20 +115,4 @@ class modComptabilite extends DolibarrModules
 
 		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/modContrat.class.php b/htdocs/core/modules/modContrat.class.php
index dedfc4efff0..c1bcc9fd914 100644
--- a/htdocs/core/modules/modContrat.class.php
+++ b/htdocs/core/modules/modContrat.class.php
@@ -199,20 +199,4 @@ class modContrat extends DolibarrModules
 
 		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/modCron.class.php b/htdocs/core/modules/modCron.class.php
index fafec485b60..90d17882672 100644
--- a/htdocs/core/modules/modCron.class.php
+++ b/htdocs/core/modules/modCron.class.php
@@ -137,39 +137,4 @@ class modCron extends DolibarrModules
 						        'user'=>2);				                // 0=Menu for internal users, 1=external users, 2=both
         $r++;
     }
-
-
-    /**
-	 *		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($options='')
-    {
-	    $sql = array();
-
-	    // Prevent pb of modules not correctly disabled
-        //$this->remove($options);
-
-        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/modDeplacement.class.php b/htdocs/core/modules/modDeplacement.class.php
index 47642e5195d..08f21ae6c63 100644
--- a/htdocs/core/modules/modDeplacement.class.php
+++ b/htdocs/core/modules/modDeplacement.class.php
@@ -145,20 +145,4 @@ class modDeplacement extends DolibarrModules
 
 		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/modDocumentGeneration.class.php b/htdocs/core/modules/modDocumentGeneration.class.php
index ea40750a161..c312cc37b5a 100644
--- a/htdocs/core/modules/modDocumentGeneration.class.php
+++ b/htdocs/core/modules/modDocumentGeneration.class.php
@@ -114,21 +114,4 @@ class modDocumentGeneration extends DolibarrModules
 
 		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/modDon.class.php b/htdocs/core/modules/modDon.class.php
index c546292c2b4..1d279b85148 100644
--- a/htdocs/core/modules/modDon.class.php
+++ b/htdocs/core/modules/modDon.class.php
@@ -158,20 +158,4 @@ class modDon  extends DolibarrModules
 
 		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);
-    }
-
 }
\ No newline at end of file
diff --git a/htdocs/core/modules/modDynamicPrices.class.php b/htdocs/core/modules/modDynamicPrices.class.php
index 1b2fb712a8b..78f56a76ab4 100644
--- a/htdocs/core/modules/modDynamicPrices.class.php
+++ b/htdocs/core/modules/modDynamicPrices.class.php
@@ -84,39 +84,4 @@ class modDynamicPrices extends DolibarrModules
         $this->rights_class = 'dynamicprices';
         $r=0;
     }
-
-
-    /**
-	 *		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($options='')
-    {
-        // Prevent pb of modules not correctly disabled
-        //$this->remove($options);
-
-        $sql = array();
-
-        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/modECM.class.php b/htdocs/core/modules/modECM.class.php
index 60d76f2e995..2bf3542186a 100644
--- a/htdocs/core/modules/modECM.class.php
+++ b/htdocs/core/modules/modECM.class.php
@@ -179,36 +179,5 @@ class modECM extends DolibarrModules
 							  'user'=>2);			// 0=Menu for internal users, 1=external users, 2=both
 		$r++;
 	}
-
-	/**
-	 *		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($options='')
-  	{
-    	$sql = array();
-
-    	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/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php
index 2f4b7a88be8..6e019849ae2 100644
--- a/htdocs/core/modules/modExpedition.class.php
+++ b/htdocs/core/modules/modExpedition.class.php
@@ -277,20 +277,4 @@ class modExpedition extends DolibarrModules
 
 		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/modExpenseReport.class.php b/htdocs/core/modules/modExpenseReport.class.php
index 851ddb39d02..690ca7ba87e 100644
--- a/htdocs/core/modules/modExpenseReport.class.php
+++ b/htdocs/core/modules/modExpenseReport.class.php
@@ -345,19 +345,4 @@ class modExpenseReport extends DolibarrModules
 
 		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
-	 *  @return     int             			1 if OK, 0 if KO
-	 */
-	function remove($options='')
-	{
-		$sql = array();
-
-		return $this->_remove($sql,$options);
-	}
 }
\ No newline at end of file
diff --git a/htdocs/core/modules/modExport.class.php b/htdocs/core/modules/modExport.class.php
index ad2da537436..634306ea4db 100644
--- a/htdocs/core/modules/modExport.class.php
+++ b/htdocs/core/modules/modExport.class.php
@@ -89,35 +89,4 @@ class modExport extends DolibarrModules
 		$this->rights[$r][3] = 0;
 		$this->rights[$r][4] = 'creer';
 	}
-
-	/**
-	 *		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($options='')
-	{
-		$sql = array();
-
-		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/modExternalSite.class.php b/htdocs/core/modules/modExternalSite.class.php
index 61eebe77f80..620fc53b53f 100644
--- a/htdocs/core/modules/modExternalSite.class.php
+++ b/htdocs/core/modules/modExternalSite.class.php
@@ -117,36 +117,5 @@ class modExternalSite extends DolibarrModules
 		$r++;
 
 	}
-
-	/**
-	 *		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($options='')
-  	{
-    	$sql = array();
-
-    	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/modFTP.class.php b/htdocs/core/modules/modFTP.class.php
index 38b16127c90..e7388faaedf 100644
--- a/htdocs/core/modules/modFTP.class.php
+++ b/htdocs/core/modules/modFTP.class.php
@@ -126,36 +126,5 @@ class modFTP extends DolibarrModules
 							  'user'=>2);			// 0=Menu for internal users, 1=external users, 2=both
 		$r++;
 	}
-
-	/**
-	 *		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($options='')
-  	{
-    	$sql = array();
-
-    	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/modFacture.class.php b/htdocs/core/modules/modFacture.class.php
index 1e0725659a0..54363bc9d80 100644
--- a/htdocs/core/modules/modFacture.class.php
+++ b/htdocs/core/modules/modFacture.class.php
@@ -342,20 +342,4 @@ class modFacture extends DolibarrModules
 
 		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 ('', 'newboxdefonly', '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 8f81bf74f7b..6a5932cca5a 100644
--- a/htdocs/core/modules/modFckeditor.class.php
+++ b/htdocs/core/modules/modFckeditor.class.php
@@ -82,37 +82,4 @@ class modFckeditor extends DolibarrModules
 		$this->rights = array();
 		$this->rights_class = 'fckeditor';
 	}
-
-	/**
-	 *		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($options='')
-	{
-		global $conf;
-
-		$sql = array();
-
-		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/modFicheinter.class.php b/htdocs/core/modules/modFicheinter.class.php
index b41b291711a..91a672fb669 100644
--- a/htdocs/core/modules/modFicheinter.class.php
+++ b/htdocs/core/modules/modFicheinter.class.php
@@ -175,20 +175,4 @@ class modFicheinter extends DolibarrModules
 
         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/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php
index d43535dd4e1..0db347f0df2 100644
--- a/htdocs/core/modules/modFournisseur.class.php
+++ b/htdocs/core/modules/modFournisseur.class.php
@@ -564,20 +564,4 @@ class modFournisseur extends DolibarrModules
 
 		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/modGeoIPMaxmind.class.php b/htdocs/core/modules/modGeoIPMaxmind.class.php
index cfe7acbdfa6..164d89243b8 100644
--- a/htdocs/core/modules/modGeoIPMaxmind.class.php
+++ b/htdocs/core/modules/modGeoIPMaxmind.class.php
@@ -85,35 +85,4 @@ class modGeoIPMaxmind extends DolibarrModules
 		$this->rights_class = 'geoipmaxmind';
 		$r=0;
 	}
-
-	/**
-	 *		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($options='')
-	{
-		$sql = array();
-
-		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/modGravatar.class.php b/htdocs/core/modules/modGravatar.class.php
index aae38ae391b..241cca18dbb 100644
--- a/htdocs/core/modules/modGravatar.class.php
+++ b/htdocs/core/modules/modGravatar.class.php
@@ -183,38 +183,5 @@ class modGravatar extends DolibarrModules
 		// $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture';
 		// $r++;
 	}
-
-	/**
-	 *		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($options='')
-	{
-		$sql = array();
-
-		//$result=$this->_load_tables('');
-
-		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/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php
index 91dde16ed08..be075f2d57a 100644
--- a/htdocs/core/modules/modHoliday.class.php
+++ b/htdocs/core/modules/modHoliday.class.php
@@ -278,36 +278,5 @@ class modHoliday extends DolibarrModules
 		// $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture';
 		// $r++;
 	}
-
-	/**
-	 *	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.
-	 *
-	 *	@return     int             1 if OK, 0 if KO
-	 */
-	function init()
-	{
-		$sql = array();
-
-		//$result=$this->_load_tables('');
-
-		return $this->_init($sql);
-	}
-
-	/**
-	 *	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()
-	{
-		$sql = array();
-
-		return $this->_remove($sql);
-	}
-
 }
 
diff --git a/htdocs/core/modules/modImport.class.php b/htdocs/core/modules/modImport.class.php
index 3a371ecf2e7..5ac3b8928db 100644
--- a/htdocs/core/modules/modImport.class.php
+++ b/htdocs/core/modules/modImport.class.php
@@ -85,35 +85,4 @@ class modImport extends DolibarrModules
 		$this->rights[$r][3] = 0;
 		$this->rights[$r][4] = 'run';
 	}
-
-	/**
-	 *		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($options='')
-	{
-		$sql = array();
-
-		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/modIncoterm.class.php b/htdocs/core/modules/modIncoterm.class.php
index 2ae30951c8c..cae4f9ec28f 100644
--- a/htdocs/core/modules/modIncoterm.class.php
+++ b/htdocs/core/modules/modIncoterm.class.php
@@ -109,34 +109,4 @@ class modIncoterm extends DolibarrModules
 		$this->menus = array();			// List of menus to add
 		$r=0;
 	}
-
-	/**
-	 *		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($options='')
-	{
-		$sql = array();
-
-		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/modLabel.class.php b/htdocs/core/modules/modLabel.class.php
index 9519c63fb95..3292e2269fb 100644
--- a/htdocs/core/modules/modLabel.class.php
+++ b/htdocs/core/modules/modLabel.class.php
@@ -89,7 +89,6 @@ class modLabel extends DolibarrModules
 
 	}
 
-
 	/**
 	 *		Function called when module is enabled.
 	 *		The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
@@ -107,20 +106,4 @@ class modLabel extends DolibarrModules
 
 		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/modLdap.class.php b/htdocs/core/modules/modLdap.class.php
index f7362ceefdd..cb2ad24fef4 100644
--- a/htdocs/core/modules/modLdap.class.php
+++ b/htdocs/core/modules/modLdap.class.php
@@ -90,35 +90,4 @@ class modLdap extends DolibarrModules
 		$this->rights = array();
 		$this->rights_class = 'ldap';
 	}
-
-	/**
-	 *		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($options='')
-	{
-		$sql = array();
-
-		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/modLoan.class.php b/htdocs/core/modules/modLoan.class.php
index 21ae96eba26..ab2ca7f33c2 100644
--- a/htdocs/core/modules/modLoan.class.php
+++ b/htdocs/core/modules/modLoan.class.php
@@ -162,20 +162,4 @@ class modLoan extends DolibarrModules
 
 		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/modMailing.class.php b/htdocs/core/modules/modMailing.class.php
index 045f857b574..9930168a218 100644
--- a/htdocs/core/modules/modMailing.class.php
+++ b/htdocs/core/modules/modMailing.class.php
@@ -147,20 +147,4 @@ class modMailing extends DolibarrModules
 
 		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/modMailmanSpip.class.php b/htdocs/core/modules/modMailmanSpip.class.php
index 1b5bbab61c6..4d96b4e8cd1 100644
--- a/htdocs/core/modules/modMailmanSpip.class.php
+++ b/htdocs/core/modules/modMailmanSpip.class.php
@@ -77,37 +77,4 @@ class modMailmanSpip extends DolibarrModules
 		$this->rights = array();
 		$this->rights_class = 'clicktodial';
 	}
-
-    /**
-	 *		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($options='')
-	{
-		global $conf;
-
-		$sql = array();
-
-		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/modMargin.class.php b/htdocs/core/modules/modMargin.class.php
index 1f0a95ea001..65396126585 100644
--- a/htdocs/core/modules/modMargin.class.php
+++ b/htdocs/core/modules/modMargin.class.php
@@ -139,36 +139,5 @@ class modMargin extends DolibarrModules
 		$this->rights[$r][4] = 'read';
 		$this->rights[$r][5] = 'all';
 	}
-
-	/**
-     *	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.
-     *
-     *	@return     int             1 if OK, 0 if KO
-     */
-	function init()
-  	{
-    	$sql = array();
-
-		//$result=$this->_load_tables();
-
-    	return $this->_init($sql);
-  	}
-
-	/**
-	 *	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()
-	{
-    	$sql = array();
-
-    	return $this->_remove($sql);
-  	}
-
 }
 
diff --git a/htdocs/core/modules/modNotification.class.php b/htdocs/core/modules/modNotification.class.php
index 78e939f4048..74d7e6dfbcc 100644
--- a/htdocs/core/modules/modNotification.class.php
+++ b/htdocs/core/modules/modNotification.class.php
@@ -90,20 +90,4 @@ class modNotification extends DolibarrModules
 
 		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/modOpenSurvey.class.php b/htdocs/core/modules/modOpenSurvey.class.php
index 44b9f928694..db93cae5220 100644
--- a/htdocs/core/modules/modOpenSurvey.class.php
+++ b/htdocs/core/modules/modOpenSurvey.class.php
@@ -195,20 +195,5 @@ class modOpenSurvey extends DolibarrModules
 
 		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/modPaybox.class.php b/htdocs/core/modules/modPaybox.class.php
index 820bc1d19c1..d77d2dfc3f4 100644
--- a/htdocs/core/modules/modPaybox.class.php
+++ b/htdocs/core/modules/modPaybox.class.php
@@ -172,38 +172,5 @@ class modPayBox extends DolibarrModules
         // $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture';
         // $r++;
     }
-
-    /**
-	 *		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($options='')
-    {
-        $sql = array();
-
-        //$result=$this->_load_tables('');
-
-        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/modPaypal.class.php b/htdocs/core/modules/modPaypal.class.php
index 8c1e0fe4797..227540e825e 100644
--- a/htdocs/core/modules/modPaypal.class.php
+++ b/htdocs/core/modules/modPaypal.class.php
@@ -164,38 +164,5 @@ class modPaypal extends DolibarrModules
         // $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture';
         // $r++;
     }
-
-    /**
-	 *		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($options='')
-    {
-        $sql = array();
-
-        //$result=$this->_load_tables('');
-
-        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/modPrelevement.class.php b/htdocs/core/modules/modPrelevement.class.php
index 7bb5e748037..84bd19712df 100644
--- a/htdocs/core/modules/modPrelevement.class.php
+++ b/htdocs/core/modules/modPrelevement.class.php
@@ -141,20 +141,4 @@ class modPrelevement extends DolibarrModules
 
 		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/modPrinting.class.php b/htdocs/core/modules/modPrinting.class.php
index bb18d7d022c..e14a2efd63e 100644
--- a/htdocs/core/modules/modPrinting.class.php
+++ b/htdocs/core/modules/modPrinting.class.php
@@ -120,35 +120,4 @@ class modPrinting extends DolibarrModules
 
 
     }
-
-    /**
-     *   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($options='')
-    {
-        $sql = array();
-
-        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/modProduct.class.php b/htdocs/core/modules/modProduct.class.php
index 691cfe7d72d..f5e366bc3ad 100644
--- a/htdocs/core/modules/modProduct.class.php
+++ b/htdocs/core/modules/modProduct.class.php
@@ -343,20 +343,4 @@ class modProduct extends DolibarrModules
 
 		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 ('', 'newboxdefonly', '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/modProductBatch.class.php b/htdocs/core/modules/modProductBatch.class.php
index bf77943ea6c..b55dba2945a 100644
--- a/htdocs/core/modules/modProductBatch.class.php
+++ b/htdocs/core/modules/modProductBatch.class.php
@@ -124,21 +124,5 @@ class modProductBatch extends DolibarrModules
 
 		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/modProjet.class.php b/htdocs/core/modules/modProjet.class.php
index 1174c47d831..ca66e861862 100644
--- a/htdocs/core/modules/modProjet.class.php
+++ b/htdocs/core/modules/modProjet.class.php
@@ -361,20 +361,4 @@ class modProjet extends DolibarrModules
 
 		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/modPropale.class.php b/htdocs/core/modules/modPropale.class.php
index 6a8dc7254d4..cb297f87a61 100644
--- a/htdocs/core/modules/modPropale.class.php
+++ b/htdocs/core/modules/modPropale.class.php
@@ -231,20 +231,4 @@ class modPropale extends DolibarrModules
 		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/modResource.class.php b/htdocs/core/modules/modResource.class.php
index 1f7a92f47b7..94a4b56427a 100644
--- a/htdocs/core/modules/modResource.class.php
+++ b/htdocs/core/modules/modResource.class.php
@@ -360,21 +360,6 @@ class modResource extends DolibarrModules
 		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
-	 */
-	public function remove($options = '')
-	{
-		$sql = array();
-
-		return $this->_remove($sql, $options);
-	}
-
 	/**
 	 * Create tables, keys and data required by module
 	 * Files llx_table1.sql, llx_table1.key.sql llx_data.sql with create table, create keys
diff --git a/htdocs/core/modules/modSalaries.class.php b/htdocs/core/modules/modSalaries.class.php
index fa8a0ebd811..1708c7a8ed0 100644
--- a/htdocs/core/modules/modSalaries.class.php
+++ b/htdocs/core/modules/modSalaries.class.php
@@ -168,20 +168,4 @@ class modSalaries extends DolibarrModules
 
 		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/modService.class.php b/htdocs/core/modules/modService.class.php
index b8040e41c7c..85ab2b03e7d 100644
--- a/htdocs/core/modules/modService.class.php
+++ b/htdocs/core/modules/modService.class.php
@@ -327,20 +327,4 @@ class modService extends DolibarrModules
 
 		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 ('', 'newboxdefonly', '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/modSkype.class.php b/htdocs/core/modules/modSkype.class.php
index f010f3b769e..a55f979db8c 100644
--- a/htdocs/core/modules/modSkype.class.php
+++ b/htdocs/core/modules/modSkype.class.php
@@ -87,39 +87,4 @@ class modSkype extends DolibarrModules
         //------------------
         $this->menu = array();
     }
-
-
-    /**
-	 *		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($options='')
-    {
-		$sql = array();
-
-        // Prevent pb of modules not correctly disabled
-        //$this->remove($options);
-
-        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/modSociete.class.php b/htdocs/core/modules/modSociete.class.php
index 6de689e792c..1d7848f5f46 100644
--- a/htdocs/core/modules/modSociete.class.php
+++ b/htdocs/core/modules/modSociete.class.php
@@ -505,20 +505,4 @@ class modSociete extends DolibarrModules
 
 		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/modStock.class.php b/htdocs/core/modules/modStock.class.php
index 63613862550..2b8e983372e 100644
--- a/htdocs/core/modules/modStock.class.php
+++ b/htdocs/core/modules/modStock.class.php
@@ -198,35 +198,4 @@ class modStock extends DolibarrModules
 		);
 
 	}
-
-	/**
-	 *		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($options='')
-	{
-		$sql = array();
-
-		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/modSyncSupplierWebServices.class.php b/htdocs/core/modules/modSyncSupplierWebServices.class.php
index 37366270a57..b87d7d9ecd5 100644
--- a/htdocs/core/modules/modSyncSupplierWebServices.class.php
+++ b/htdocs/core/modules/modSyncSupplierWebServices.class.php
@@ -83,39 +83,4 @@ class modSyncSupplierWebServices extends DolibarrModules
         $this->rights_class = 'syncsupplierwebservices';
         $r=0;
     }
-
-
-    /**
-	 *		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($options='')
-    {
-        // Prevent pb of modules not correctly disabled
-        //$this->remove($options);
-
-        $sql = array();
-
-        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/modSyslog.class.php b/htdocs/core/modules/modSyslog.class.php
index f2b5f80ff32..a635e8f2fdc 100644
--- a/htdocs/core/modules/modSyslog.class.php
+++ b/htdocs/core/modules/modSyslog.class.php
@@ -80,37 +80,4 @@ class modSyslog extends DolibarrModules
 		$this->rights = array();
 		$this->rights_class = 'syslog';
 	}
-
-
-	/**
-	 *		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($options='')
-	{
-		$sql = array();
-
-		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/modTax.class.php b/htdocs/core/modules/modTax.class.php
index 6f47d66f5a9..9e8ee7908d7 100644
--- a/htdocs/core/modules/modTax.class.php
+++ b/htdocs/core/modules/modTax.class.php
@@ -156,20 +156,4 @@ class modTax extends DolibarrModules
 
 		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/modUser.class.php b/htdocs/core/modules/modUser.class.php
index 04d4b81039a..41598f51106 100644
--- a/htdocs/core/modules/modUser.class.php
+++ b/htdocs/core/modules/modUser.class.php
@@ -242,20 +242,4 @@ class modUser extends DolibarrModules
 
 		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/modWebServices.class.php b/htdocs/core/modules/modWebServices.class.php
index 9211d2749d0..a22e5a5be64 100644
--- a/htdocs/core/modules/modWebServices.class.php
+++ b/htdocs/core/modules/modWebServices.class.php
@@ -83,39 +83,4 @@ class modWebServices extends DolibarrModules
         $this->rights_class = 'webservices';
         $r=0;
     }
-
-
-    /**
-	 *		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($options='')
-    {
-        // Prevent pb of modules not correctly disabled
-        //$this->remove($options);
-
-        $sql = array();
-
-        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/modWorkflow.class.php b/htdocs/core/modules/modWorkflow.class.php
index ed0f66e6455..0eb447306b4 100644
--- a/htdocs/core/modules/modWorkflow.class.php
+++ b/htdocs/core/modules/modWorkflow.class.php
@@ -148,20 +148,4 @@ class modWorkflow extends DolibarrModules
 
         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);
-    }
-
 }
-- 
GitLab