From 0d10722a7fc48efce5e1bcec6ce5e83fe4ab63ef Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 10 Jul 2018 14:57:23 +0200 Subject: [PATCH 1/2] Docs : Update and complete --- htdocs/core/modules/modSociete.class.php | 7 +++++-- htdocs/core/modules/modStock.class.php | 7 +++++-- htdocs/core/modules/modStripe.class.php | 3 ++- .../core/modules/modSupplierProposal.class.php | 16 +++++++++++----- htdocs/core/modules/modSyslog.class.php | 7 +++++-- htdocs/core/modules/modTax.class.php | 8 +++++--- 6 files changed, 33 insertions(+), 15 deletions(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 9d9c0268e2d..5b40ea235a6 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -66,8 +66,11 @@ class modSociete extends DolibarrModules $this->dirs = array("/societe/temp"); // Dependencies - $this->depends = array(); - $this->requiredby = array("modExpedition","modFacture","modFournisseur","modFicheinter","modPropale","modContrat","modCommande"); + $this->hidden = false; // A condition to hide module + $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled + $this->requiredby = array("modExpedition","modFacture","modFournisseur","modFicheinter","modPropale","modContrat","modCommande"); // List of module ids to disable if this one is disabled + $this->conflictwith = array(); // List of module class names as string this module is in conflict with + $this->phpmin = array(5,4); // Minimum version of PHP required by module $this->langfiles = array("companies",'bills'); // Constants diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php index ff767dd3658..9622e087699 100644 --- a/htdocs/core/modules/modStock.class.php +++ b/htdocs/core/modules/modStock.class.php @@ -65,8 +65,11 @@ class modStock extends DolibarrModules $this->config_page_url = array("stock.php"); // Dependencies - $this->depends = array("modProduct"); - $this->requiredby = array("modProductBatch"); + $this->hidden = false; // A condition to hide module + $this->depends = array("modProduct"); // List of module class names as string that must be enabled if this module is enabled + $this->requiredby = array("modProductBatch"); // List of module ids to disable if this one is disabled + $this->conflictwith = array(); // List of module class names as string this module is in conflict with + $this->phpmin = array(5,4); // Minimum version of PHP required by module $this->langfiles = array("stocks"); // Constants diff --git a/htdocs/core/modules/modStripe.class.php b/htdocs/core/modules/modStripe.class.php index e5b481f4daa..1f6f1e92f05 100644 --- a/htdocs/core/modules/modStripe.class.php +++ b/htdocs/core/modules/modStripe.class.php @@ -65,10 +65,11 @@ class modStripe extends DolibarrModules // Data directories to create when module is enabled. $this->dirs = array(); - // Config pages. Put here list of php page names stored in admmin directory used to setup module. + // Config pages. Put here list of php page names stored in admin directory used to setup module. $this->config_page_url = array("stripe.php@stripe"); // Dependencies + $this->hidden = false; // A condition to hide module $this->depends = array(); // List of modules id that must be enabled if this module is enabled $this->requiredby = array(); // List of modules id to disable if this one is disabled $this->phpmin = array(5,4); // Minimum version of PHP required by module diff --git a/htdocs/core/modules/modSupplierProposal.class.php b/htdocs/core/modules/modSupplierProposal.class.php index fa7553fd6df..bb3cda6a837 100644 --- a/htdocs/core/modules/modSupplierProposal.class.php +++ b/htdocs/core/modules/modSupplierProposal.class.php @@ -57,13 +57,19 @@ class modSupplierProposal extends DolibarrModules $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); $this->picto='supplier_proposal'; - + + // Data directories to create when module is enabled. $this->dirs = array(); + + // Config pages. Put here list of php page names stored in admin directory used to setup module. + $this->config_page_url = array("supplier_proposal.php"); - // Dependancies - $this->depends = array('modFournisseur'); - $this->requiredby = array(); - $this->config_page_url = array("supplier_proposal.php"); + // Dependencies + $this->hidden = false; // A condition to hide module + $this->depends = array('modFournisseur'); // List of module class names as string that must be enabled if this module is enabled + $this->requiredby = array(); // List of module ids to disable if this one is disabled + $this->conflictwith = array(); // List of module class names as string this module is in conflict with + $this->phpmin = array(5,4); // Minimum version of PHP required by module $this->langfiles = array("supplier_proposal"); // Constants diff --git a/htdocs/core/modules/modSyslog.class.php b/htdocs/core/modules/modSyslog.class.php index fca192f5ec0..0274eeb2e63 100644 --- a/htdocs/core/modules/modSyslog.class.php +++ b/htdocs/core/modules/modSyslog.class.php @@ -67,8 +67,11 @@ class modSyslog extends DolibarrModules $this->config_page_url = array("syslog.php"); // Dependencies - $this->depends = array(); - $this->requiredby = array(); + $this->hidden = false; // A condition to hide module + $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled + $this->requiredby = array(); // List of module ids to disable if this one is disabled + $this->conflictwith = array(); // List of module class names as string this module is in conflict with + $this->phpmin = array(5,4); // Minimum version of PHP required by module // Constants $this->const = array(); diff --git a/htdocs/core/modules/modTax.class.php b/htdocs/core/modules/modTax.class.php index f3fa7d4e9db..e3b49bba016 100644 --- a/htdocs/core/modules/modTax.class.php +++ b/htdocs/core/modules/modTax.class.php @@ -67,9 +67,11 @@ class modTax extends DolibarrModules $this->config_page_url = array("taxes.php"); // Dependencies - $this->depends = array(); - $this->requiredby = array(); - $this->conflictwith = array(); + $this->hidden = false; // A condition to hide module + $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled + $this->requiredby = array(); // List of module ids to disable if this one is disabled + $this->conflictwith = array(); // List of module class names as string this module is in conflict with + $this->phpmin = array(5,4); // Minimum version of PHP required by module $this->langfiles = array("compta","bills"); // Constants From 72adc485f090d67aec1c0a6f6fd5821433c2a220 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 10 Jul 2018 22:32:55 +0200 Subject: [PATCH 2/2] Docs : Update and complete --- htdocs/core/modules/modTax.class.php | 3 --- htdocs/core/modules/modTicket.class.php | 13 ++++++------- htdocs/core/modules/modUser.class.php | 13 ++++++------- htdocs/core/modules/modVariants.class.php | 10 ++++------ htdocs/core/modules/modWebServices.class.php | 16 ++++++---------- .../core/modules/modWebServicesClient.class.php | 15 ++++++--------- htdocs/core/modules/modWebsite.class.php | 8 ++------ htdocs/core/modules/modWorkflow.class.php | 8 +++++--- 8 files changed, 35 insertions(+), 51 deletions(-) diff --git a/htdocs/core/modules/modTax.class.php b/htdocs/core/modules/modTax.class.php index e3b49bba016..91ed84366de 100644 --- a/htdocs/core/modules/modTax.class.php +++ b/htdocs/core/modules/modTax.class.php @@ -119,13 +119,10 @@ class modTax extends DolibarrModules // Menus - //------- - $this->menu = 1; // This module add menu entries. They are coded into menu manager. // Exports - //-------- $r=0; $r++; diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php index 01c10a631ca..bc871d9c0e0 100644 --- a/htdocs/core/modules/modTicket.class.php +++ b/htdocs/core/modules/modTicket.class.php @@ -95,12 +95,11 @@ class modTicket extends DolibarrModules $this->config_page_url = array("ticket.php"); // Dependencies - // List of modules id that must be enabled if this module is enabled - $this->depends = array(); - // List of modules id to disable if this one is disabled - $this->requiredby = array(); - // Minimum version of PHP required by module - $this->phpmin = array(5, 3); + $this->hidden = false; // A condition to hide module + $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled + $this->requiredby = array(); // List of module ids to disable if this one is disabled + $this->conflictwith = array(); // List of module class names as string this module is in conflict with + $this->phpmin = array(5,4); // Minimum version of PHP required by module $this->langfiles = array("ticket"); // Constants // List of particular constants to add when module is enabled @@ -115,7 +114,7 @@ class modTicket extends DolibarrModules 'project:+ticket:Tickets:@ticket:$user->rights->ticket->read:/ticket/list.php?projectid=__ID__', ); - // Dictionnaries + // Dictionaries if (! isset($conf->ticket->enabled)) { $conf->ticket=new stdClass(); $conf->ticket->enabled=0; diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php index 1c4a08411ad..19e146a6e8c 100644 --- a/htdocs/core/modules/modUser.class.php +++ b/htdocs/core/modules/modUser.class.php @@ -63,9 +63,12 @@ class modUser extends DolibarrModules // Config pages $this->config_page_url = array("user.php"); - // Dependancies - $this->depends = array(); - $this->requiredby = array(); + // Dependencies + $this->hidden = false; // A condition to hide module + $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled + $this->requiredby = array(); // List of module ids to disable if this one is disabled + $this->conflictwith = array(); // List of module class names as string this module is in conflict with + $this->phpmin = array(5,4); // Minimum version of PHP required by module $this->langfiles = array("main","users","companies","members",'salaries'); $this->always_enabled = true; // Can't be disabled @@ -205,13 +208,10 @@ class modUser extends DolibarrModules // Menus - //------- - $this->menu = 1; // This module add menu entries. They are coded into menu manager. // Exports - //-------- $r=0; $r++; @@ -244,7 +244,6 @@ class modUser extends DolibarrModules $this->export_sql_end[$r] .=' WHERE u.entity IN ('.getEntity('user').')'; // Imports - //-------- $r=0; // Import list of users attributes diff --git a/htdocs/core/modules/modVariants.class.php b/htdocs/core/modules/modVariants.class.php index c56f5c0e49a..19c50d8843e 100644 --- a/htdocs/core/modules/modVariants.class.php +++ b/htdocs/core/modules/modVariants.class.php @@ -79,12 +79,10 @@ class modVariants extends DolibarrModules // Dependencies $this->hidden = false; // A condition to hide module - $this->depends = array( - 'modProduct' - ); // List of modules id that must be enabled if this module is enabled - $this->requiredby = array(); // List of modules id to disable if this one is disabled - $this->conflictwith = array(); // List of modules id this module is in conflict with - $this->phpmin = array(5,0); // Minimum version of PHP required by module + $this->depends = array('modProduct'); // List of module class names as string that must be enabled if this module is enabled + $this->requiredby = array(); // List of module ids to disable if this one is disabled + $this->conflictwith = array(); // List of module class names as string this module is in conflict with + $this->phpmin = array(5,4); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module $this->langfiles = array("products"); diff --git a/htdocs/core/modules/modWebServices.class.php b/htdocs/core/modules/modWebServices.class.php index 8963f81813f..a3e9510563f 100644 --- a/htdocs/core/modules/modWebServices.class.php +++ b/htdocs/core/modules/modWebServices.class.php @@ -55,30 +55,26 @@ class modWebServices extends DolibarrModules $this->dirs = array(); // Config pages - //------------- $this->config_page_url = array("index.php@webservices"); - // Dependancies - //------------- - $this->depends = array(); - $this->requiredby = array(); - //$this->phpmax = array(7,1); // Maximum version of PHP required by module + // Dependencies + $this->hidden = false; // A condition to hide module + $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled + $this->requiredby = array(); // List of module ids to disable if this one is disabled + $this->conflictwith = array(); // List of module class names as string this module is in conflict with + $this->phpmin = array(5,4); // Minimum version of PHP required by module $this->langfiles = array("other"); // Constants - //----------- $this->const = array(); // New pages on tabs - // ----------------- $this->tabs = array(); // Boxes - //------ $this->boxes = array(); // Permissions - //------------ $this->rights = array(); $this->rights_class = 'webservices'; $r=0; diff --git a/htdocs/core/modules/modWebServicesClient.class.php b/htdocs/core/modules/modWebServicesClient.class.php index 9b6535143b3..35c4da5b037 100644 --- a/htdocs/core/modules/modWebServicesClient.class.php +++ b/htdocs/core/modules/modWebServicesClient.class.php @@ -55,29 +55,26 @@ class modWebServicesClient extends DolibarrModules $this->dirs = array(); // Config pages - //------------- //$this->config_page_url = array(); - // Dependancies - //------------- - $this->depends = array(); - $this->requiredby = array(); + // Dependencies + $this->hidden = false; // A condition to hide module + $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled + $this->requiredby = array(); // List of module ids to disable if this one is disabled + $this->conflictwith = array(); // List of module class names as string this module is in conflict with + $this->phpmin = array(5,4); // Minimum version of PHP required by module $this->langfiles = array("other"); // Constants - //----------- $this->const = array(); // New pages on tabs - // ----------------- $this->tabs = array(); // Boxes - //------ $this->boxes = array(); // Permissions - //------------ $this->rights = array(); $this->rights_class = 'syncsupplierwebservices'; $r=0; diff --git a/htdocs/core/modules/modWebsite.class.php b/htdocs/core/modules/modWebsite.class.php index fb6e91283db..f684985917a 100644 --- a/htdocs/core/modules/modWebsite.class.php +++ b/htdocs/core/modules/modWebsite.class.php @@ -61,27 +61,23 @@ class modWebsite extends DolibarrModules $this->dirs = array("/website/temp"); // Config pages - //------------- $this->config_page_url = array('website.php'); - // Dependancies - //------------- + // Dependencies $this->hidden = ! empty($conf->global->MODULE_WEBSITE_DISABLED); // A condition to disable module $this->depends = array('modFckeditor'); // List of modules id that must be enabled if this module is enabled $this->requiredby = array(); // List of modules id to disable if this one is disabled $this->conflictwith = array(); // List of modules id this module is in conflict with + $this->phpmin = array(5,4); // Minimum version of PHP required by module $this->langfiles = array("website"); // Constants - //----------- $this->const = array(); // New pages on tabs - // ----------------- //$this->tabs[] = array(); // To add a new tab identified by code tabname1 // Boxes - //------ $this->boxes = array(); // Permissions diff --git a/htdocs/core/modules/modWorkflow.class.php b/htdocs/core/modules/modWorkflow.class.php index e721513073a..882e8aebf53 100644 --- a/htdocs/core/modules/modWorkflow.class.php +++ b/htdocs/core/modules/modWorkflow.class.php @@ -68,9 +68,11 @@ class modWorkflow extends DolibarrModules $this->config_page_url = array('workflow.php'); // Dependencies - $this->depends = array(); // List of modules id that must be enabled if this module is enabled - $this->requiredby = array(); // List of modules id to disable if this one is disabled - $this->phpmin = array(5,2); // Minimum version of PHP required by module + $this->hidden = false; // A condition to hide module + $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled + $this->requiredby = array(); // List of module ids to disable if this one is disabled + $this->conflictwith = array(); // List of module class names as string this module is in conflict with + $this->phpmin = array(5,4); // Minimum version of PHP required by module $this->need_dolibarr_version = array(2,8); // Minimum version of Dolibarr required by module $this->langfiles = array("@workflow");