diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index 7c207e9877b3d4b6b3562cc0a1df1bc33e9e9d2a..7eebdee8bcd815d0765049da27ee7c8eb3b07cc3 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -34,11 +34,11 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; class modMyModule extends DolibarrModules { /** - * Constructor. Define names, constants, directories, boxes, permissions + * Constructor. Define names, constants, directories, boxes, permissions * - * @param DoliDB $db Database handler + * @param DoliDB $db Database handler */ - function __construct($db) + public function __construct($db) { global $langs,$conf; @@ -249,24 +249,24 @@ class modMyModule extends DolibarrModules * @param string $options Options when enabling module ('', 'noboxes') * @return int 1 if OK, 0 if KO */ - function init($options='') + public function init($options='') { $sql = array(); - $result=$this->_load_tables('/mymodule/sql/'); + //$this->_load_tables('/mymodule/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 + * 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 + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO */ - function remove($options='') + public function remove($options = '') { $sql = array(); diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 341edac82718a0e3272b55bed42b27cadfbd996f..eee8dd502870025b71a83d6c5f4c7e185d156bc7 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -194,6 +194,13 @@ abstract class DolibarrModules */ public $core_enabled; + /** + * Constructor. Define names, constants, directories, boxes, permissions + * + * @param DoliDB $db Database handler + */ + abstract public function __construct($db); + /** * Enables a module. * Inserts all informations into database @@ -1672,4 +1679,30 @@ print $sql; return $err; } + /** + * 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 + */ + public function init($options = '') + { + return $this->_init(array(), $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 = '') + { + return $this->_remove(array(), $options); + } + } diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index 84e18048e849ddfa5a67ada76dafcc62d44a1a55..7b7a9dd4517db2542859c675cc16070341f7b852 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 c897be729ec9a58d4d84bd9bb2961f7961db72ff..1090e8b69391ecb82176670c9c2ac25c84b161dd 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 c6492ab5161815ab4d48c7db41073170fb38b8f3..3119553f677a81d83908850c4030327768271546 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 2bdcbe03c54e50c9d1de0bc91239524d8074972a..5e0e825d1e023ed2e0d279a0fda92400fbc62c5f 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 371f2c9f21403e10bf67424e6290f24642879672..23d4fb20f42167de0aa7a306b4f90aa6051e4de4 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 df698b26a90d3b34ef7bd11ec32d9c10664fc05c..9222a38ff2691911278e5c8dabab9951a6dedc4c 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 0d06c1657c2cf5261a2b6742191e8ada565533f5..4ee6084aaf6e86e1c95936665a38abb3b62a17b3 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 587429aa830d386adb8afe328a03a976e1472f93..a6585e14d5428a0a3483b1a294485f2f11daa412 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 d6deb4ab51f37f644f5bec55b1441a0583c90235..9b25616259711408b7b7e24a16fa7f9bcd5548ab 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 b64c9671a99c01b87aa30ced9f689ba9e09a32f7..e9efbcbe732fb15f014ed19e210b7b7ae586b081 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 872700c18170374335af80cd9256e483792c1987..518cafa35a4a8aa483e3a60886aa55c6596528b0 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 03b1a6d964bc6c037318b6bdf1b4eac6c18b0503..4289bd54932bc7a4231b9ab091d5d850142f1716 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 74002f0065f462c09e36fdf07e102008fdaa5bdf..e23a04ce5482f0514086d5de08483844f7c4aadc 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 dedfc4efff0a63b2b77ea11cb0980816ae447674..c1bcc9fd91491a114c00f2e0e9ce96f51f25f4fc 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 fafec485b600522c012be9f494b7457f00549c5f..90d17882672ed2dc1bfb360a2aa6ef4aa1eb5c90 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 47642e5195d505f03dfd234760313ecbf2d69a08..08f21ae6c63826a4caecbe968578a65d0f0d5b55 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 ea40750a16161533507f0b70c942d3403dd5101b..c312cc37b5aa5df7308919f6066ed644e947ff33 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 c546292c2b462195017fe2663dc23d821cd96942..1d279b8514863dbf567c9dab321705dff0a1cb51 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 1b2fb712a8b02227a4351262c5976319d92c31a6..78f56a76ab4d10acd59a3937d92c307c8a32ed9c 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 60d76f2e995fbed6a5ead8d5c8e21a786c6bd81b..2bf3542186ad015571e7a3412b89fca607146d16 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 2f4b7a88be83f696f69c13902d58e5b4a14da41b..6e019849ae2ae92a015f9cbb6dc994450e7bfac4 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 851ddb39d0281f02ce5de86d7d70e53dc9c4e774..690ca7ba87e732bd3739ca937600eb87c4e97752 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 ad2da537436eb9f2d0463aff432240877d3a4aa9..634306ea4db62f67e3f67dbc427bbeb05d6b1083 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 61eebe77f8073f9fe44347e2c6838a76704316f8..620fc53b53f1f50355c3300240b2bb2c951c7944 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 38b16127c90730ec4b18b98aaeaeb8e358f5d7a4..e7388faaedf55a0bc3357da5a4b2f4eaa59039d4 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 1e0725659a02214df9bed8f3bedf7e5ac2a26f86..54363bc9d801f703a676e31f1d8653d31d372e27 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 8f81bf74f7bdbe889ac58c596519bd240e206512..6a5932cca5ae791bfcb2d9761c34ecfbc94498c7 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 b41b291711aeaf5f45c374c915e577a2f6e73a10..91a672fb6694d311233b6541c3a91c85e96d40b9 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 d43535dd4e136b7875671393491a04658c688043..0db347f0df23e9106c02f69bdca42a8602cb7c1c 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 cfe7acbdfa6312577d88873eeb84484d2924a4a9..164d89243b8ffc7f870eeed40ea03b29dded8a97 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 aae38ae391b2009fe240888752ead2f048c17a15..241cca18dbbcead04aec9703bfc561a5b3e119dd 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 91dde16ed08c8f52a794a901b3ac68a29f33fa22..be075f2d57a8f8f4a08783c9f118c28b51c4dfa7 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 3a371ecf2e7991fb8037cb889bb0d2468c9b67c1..5ac3b8928db684df5be1c78027cc042f7d9d540b 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 2ae30951c8c60e70291e896eff635356feba1e57..cae4f9ec28f06f38f519f987a43b7ace6cd2d994 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 9519c63fb95df3ef0bb1094f76413c2e41b5c614..3292e2269fbd15555282423b65315feca8cc1320 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 f7362ceefdd39974f2444ee878a08c26054a4bf5..cb2ad24fef42a98ebb277c04490b46204dfd29e5 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 21ae96eba26bf7f0d3e97225282b795d30f6616d..ab2ca7f33c28fcbfe9eaf8dc058cb0c4361d93d2 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 045f857b574b893545fff85c43f19002db1e8992..9930168a21895ad4e222c3967aeeb590aa9238ba 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 1b5bbab61c69706e26fe96084195aecc297a6b03..4d96b4e8cd1dbca526a8956f9b37fab75d966d24 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 1f0a95ea001387d6c65c1e9cd4fd52615ee3d518..653961265850c8fdce68b0b928629fdd80d74abc 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 78e939f4048a37034da521d39e9f46bbe2a3f7c3..74d7e6dfbcce0cdb580f7a1e842a7d412117f7b3 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 44b9f9286940efb3b8f350554674e849e6b7d891..db93cae5220ee7fac5e5ed800b817cd9ba941ec2 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 820bc1d19c13709ac543a5640bbf739b512d8501..d77d2dfc3f4dc3132c82ba9db2a3203e3659f16f 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 8c1e0fe4797b251abf393a8b523dbe33e598a81d..227540e825e91afbcdb206cff7a810c6266c4006 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 7bb5e748037970a0c8d8ddcc7719602848dd063a..84bd19712df2b50399fbdae1f3f1bfab126f6d26 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 bb18d7d022c4667bf207a2fcbe53cb859d101b81..e14a2efd63e7ab18ef02b93d921b7ee88549c90f 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 691cfe7d72df6615e27e719a8e1c7807076bf2f7..f5e366bc3ad0e40547e2eb5f7742fa774245df8f 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 bf77943ea6cc2720317febd2966e73856d9290ba..b55dba2945aad12845ad0a32c110b4244eef70ce 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 1174c47d83188080d0b8c7804011eeacdc12a28f..ca66e8618620b2f5141d10dd9e9e72c56d75926a 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 6a8dc7254d4c49c1e5eb2ef8595e22ec01c47247..cb297f87a615a419eb4a8af8b6d373972f9086df 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 1f7a92f47b7f6500a01fd2c686d005293a6cd429..94a4b56427a7d52afbc9adf0b9020f4ff2c47ce2 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 fa8a0ebd811e3f3d5f6a1a021555ad7d61a2d624..1708c7a8ed08bb1a9c1bb2c2c6b8cf9939f32d7e 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 b8040e41c7c52129a65e52bc1b15df5997316c08..85ab2b03e7d65fc730b4d715c85a89623582d08f 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 f010f3b769e1752107f1e00cece907dffee31b12..a55f979db8c54754955959f22895f2422220062d 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 6de689e792cd7c92cc9e928e8a58db4bf5226a5a..1d7848f5f46a1bc154358366c0b7511e5bc7de0e 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 6361386255073c30244e327b3b75aaa2c6e8e134..2b8e983372eb0d7b7d4bb872e2bd641893942480 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 37366270a57499e4133c5d2c1a69079ab2ffb40c..b87d7d9ecd58aa1b6bac6db994607815d41800ab 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 f2b5f80ff32ec16b0024e93f6a37fc34630cc093..a635e8f2fdcd65953602ba0e0359123571d3179b 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 6f47d66f5a9d2e04f2fe6965a6c921f8c827ae1a..9e8ee7908d77c56e241f0a19a7d5082205944eab 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 04d4b81039a605d42a84e319e31517cabe48355b..41598f5110688ae46bdfd58183b72152649b5207 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 9211d2749d096816e5b01227e7c668378fc19d51..a22e5a5be64349d399bfd0786ef2772c4b50d05f 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 ed0f66e6455717eae2f9a6ad4b712f66a1040f6e..0eb447306b4569c6c03b81b77dc3e52b10c01680 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); - } - }