From 08b9c0c926f31f420875d86d68110e94f0377fd5 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 19 Sep 2018 16:06:39 +0200 Subject: [PATCH 01/46] Missing translation --- htdocs/expedition/shipment.php | 5 +++-- htdocs/langs/en_US/deliveries.lang | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 24ccda21579..33e1dd97f7b 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012-2015 Juanjo Menent * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018 Philippe Grand * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -921,8 +922,8 @@ if ($id > 0 || ! empty($ref)) } else { - /* Commande non trouvee */ - print "Commande inexistante"; + /* Order not found */ + setEventMessages($langs->trans("NonExistentOrder"), null, 'errors'); } } diff --git a/htdocs/langs/en_US/deliveries.lang b/htdocs/langs/en_US/deliveries.lang index 7e39f48ea55..1c9cb791900 100644 --- a/htdocs/langs/en_US/deliveries.lang +++ b/htdocs/langs/en_US/deliveries.lang @@ -28,3 +28,4 @@ ErrorStockIsNotEnough=There's not enough stock Shippable=Shippable NonShippable=Not Shippable ShowReceiving=Show delivery receipt +NonExistentOrder=Non-existent order From ad84340bf50ad1a9d74e925f762a346ec810d594 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 19 Sep 2018 16:21:52 +0200 Subject: [PATCH 02/46] Standardize and update code --- .../commande/doc/doc_generic_order_odt.modules.php | 7 ++++++- .../core/modules/commande/doc/pdf_einstein.modules.php | 6 +++--- .../contract/doc/doc_generic_contract_odt.modules.php | 7 ++++++- .../doc/doc_generic_shipment_odt.modules.php | 7 ++++++- .../facture/doc/doc_generic_invoice_odt.modules.php | 5 +++++ .../product/doc/doc_generic_product_odt.modules.php | 7 ++++++- .../core/modules/product/doc/pdf_standard.modules.php | 10 +++++++--- 7 files changed, 39 insertions(+), 10 deletions(-) diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index ba9a9490daa..1230bcad52d 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -38,9 +38,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; */ class doc_generic_order_odt extends ModelePDFCommandes { - public $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; public $phpmin = array(5,4,0); // Minimum version of PHP required by module + public $version = 'dolibarr'; diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 1bae075142f..cba8ed016b9 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -114,9 +114,9 @@ class pdf_einstein extends ModelePDFCommandes public $marge_basse; /** - * Issuer - * @var Societe - */ + * Issuer + * @var Societe + */ public $emetteur; // Objet societe qui emet diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index f8940dd95ef..ab43829a305 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -37,9 +37,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; */ class doc_generic_contract_odt extends ModelePDFContract { - public $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; public $phpmin = array(5,4,0); // Minimum version of PHP required by module + public $version = 'dolibarr'; diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index f5e2b182a73..6e058f4a92d 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -39,9 +39,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; */ class doc_generic_shipment_odt extends ModelePdfExpedition { - public $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; public $phpmin = array(5,4,0); // Minimum version of PHP required by module + public $version = 'dolibarr'; diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index ddd2df87b93..fb34a3da1f9 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -38,9 +38,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; */ class doc_generic_invoice_odt extends ModelePDFFactures { + /** + * Issuer + * @var Societe + */ public $emetteur; // Objet societe qui emet public $phpmin = array(5,4,0); // Minimum version of PHP required by module + public $version = 'dolibarr'; diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index ca50317fe81..f4a829dcc51 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -36,9 +36,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; */ class doc_generic_product_odt extends ModelePDFProduct { - public $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; public $phpmin = array(5,4,0); // Minimum version of PHP required by module + public $version = 'dolibarr'; diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index 16efd190836..b163e22c712 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -58,9 +58,9 @@ class pdf_standard extends ModelePDFProduct /** * @var array() Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.3 = array(5, 3) + * e.g.: PHP ≥ 5.4 = array(5, 4) */ - public $phpmin = array(5, 2); + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document @@ -76,7 +76,11 @@ class pdf_standard extends ModelePDFProduct public $marge_haute; public $marge_basse; - public $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; /** From 9a487169c821687e75f79e0e1cfe107fe97fcf6b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 19 Sep 2018 16:31:36 +0200 Subject: [PATCH 03/46] Standardize and update code --- .../project/task/doc/doc_generic_task_odt.modules.php | 5 +++++ .../propale/doc/doc_generic_proposal_odt.modules.php | 5 +++++ .../stock/doc/doc_generic_stock_odt.modules.php | 7 ++++++- htdocs/core/modules/stock/doc/pdf_standard.modules.php | 10 +++++++--- .../core/modules/stock/doc/pdf_stdmovement.modules.php | 10 +++++++--- .../doc/doc_generic_supplier_proposal_odt.modules.php | 7 ++++++- .../modules/user/doc/doc_generic_user_odt.modules.php | 7 ++++++- .../doc/doc_generic_usergroup_odt.modules.php | 7 ++++++- 8 files changed, 48 insertions(+), 10 deletions(-) diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index 7846c68af7a..b7500731ab9 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -54,9 +54,14 @@ if (! empty($conf->agenda->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/ */ class doc_generic_task_odt extends ModelePDFTask { + /** + * Issuer + * @var Societe + */ public $emetteur; // Objet societe qui emet public $phpmin = array(5,4,0); // Minimum version of PHP required by module + public $version = 'dolibarr'; diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 7483c2a9623..03a555435c4 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -37,9 +37,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; */ class doc_generic_proposal_odt extends ModelePDFPropales { + /** + * Issuer + * @var Societe + */ public $emetteur; // Objet societe qui emet public $phpmin = array(5,4,0); // Minimum version of PHP required by module + public $version = 'dolibarr'; diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index d5e0f1ba984..a433287a63c 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -36,9 +36,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; */ class doc_generic_stock_odt extends ModelePDFStock { - public $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; public $phpmin = array(5,4,0); // Minimum version of PHP required by module + public $version = 'dolibarr'; diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 66799612d8f..957a4fc2e32 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -58,9 +58,9 @@ class pdf_standard extends ModelePDFStock /** * @var array() Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.3 = array(5, 3) + * e.g.: PHP ≥ 5.4 = array(5, 4) */ - public $phpmin = array(5, 2); + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document @@ -76,7 +76,11 @@ class pdf_standard extends ModelePDFStock public $marge_haute; public $marge_basse; - public $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; /** diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index a4795926cc4..0c9c55b5e7f 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -59,9 +59,9 @@ class pdf_stdmovement extends ModelePDFMovement /** * @var array() Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.3 = array(5, 3) + * e.g.: PHP ≥ 5.4 = array(5, 4) */ - public $phpmin = array(5, 2); + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document @@ -77,7 +77,11 @@ class pdf_stdmovement extends ModelePDFMovement public $marge_haute; public $marge_basse; - public $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; /** diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index 5a318a3a6b3..423804b284c 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -37,9 +37,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; */ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal { - public $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; public $phpmin = array(5,4,0); // Minimum version of PHP required by module + public $version = 'dolibarr'; diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index e3d44050149..1f993bfcd86 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -35,9 +35,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; */ class doc_generic_user_odt extends ModelePDFUser { - public $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; public $phpmin = array(5,4,0); // Minimum version of PHP required by module + public $version = 'dolibarr'; diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index 76cc423eb32..ffb356cbb9b 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -37,9 +37,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; */ class doc_generic_usergroup_odt extends ModelePDFUserGroup { - public $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; public $phpmin = array(5,4,0); // Minimum version of PHP required by module + public $version = 'dolibarr'; From 06ad6e71963f452885cea3870e652c70d855491b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 19 Sep 2018 16:36:08 +0200 Subject: [PATCH 04/46] Standardize and update code --- .../modules/commande/doc/doc_generic_order_odt.modules.php | 4 ++++ .../modules/contract/doc/doc_generic_contract_odt.modules.php | 4 ++++ .../expedition/doc/doc_generic_shipment_odt.modules.php | 4 ++++ .../modules/facture/doc/doc_generic_invoice_odt.modules.php | 4 ++++ .../modules/product/doc/doc_generic_product_odt.modules.php | 4 ++++ .../modules/project/task/doc/doc_generic_task_odt.modules.php | 4 ++++ .../modules/propale/doc/doc_generic_proposal_odt.modules.php | 4 ++++ .../core/modules/stock/doc/doc_generic_stock_odt.modules.php | 4 ++++ 8 files changed, 32 insertions(+) diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 1230bcad52d..7c3ca5bd2e6 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -46,6 +46,10 @@ class doc_generic_order_odt extends ModelePDFCommandes public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * Dolibarr version of the loaded document + * @public string + */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index ab43829a305..eca3f13d57f 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -45,6 +45,10 @@ class doc_generic_contract_odt extends ModelePDFContract public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * Dolibarr version of the loaded document + * @public string + */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 6e058f4a92d..729663bf625 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -47,6 +47,10 @@ class doc_generic_shipment_odt extends ModelePdfExpedition public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * Dolibarr version of the loaded document + * @public string + */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index fb34a3da1f9..77824b75c8c 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -46,6 +46,10 @@ class doc_generic_invoice_odt extends ModelePDFFactures public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * Dolibarr version of the loaded document + * @public string + */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index f4a829dcc51..b11e17a6623 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -44,6 +44,10 @@ class doc_generic_product_odt extends ModelePDFProduct public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * Dolibarr version of the loaded document + * @public string + */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index b7500731ab9..c881c6c5b46 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -62,6 +62,10 @@ class doc_generic_task_odt extends ModelePDFTask public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * Dolibarr version of the loaded document + * @public string + */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 03a555435c4..469d154ddc5 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -45,6 +45,10 @@ class doc_generic_proposal_odt extends ModelePDFPropales public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * Dolibarr version of the loaded document + * @public string + */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index a433287a63c..4f9de22f975 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -44,6 +44,10 @@ class doc_generic_stock_odt extends ModelePDFStock public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * Dolibarr version of the loaded document + * @public string + */ public $version = 'dolibarr'; From 9b3dba4a561652596ad01c9863d3856bf4a34c80 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 19 Sep 2018 16:43:37 +0200 Subject: [PATCH 05/46] Standardize and update code --- .../doc/doc_generic_supplier_proposal_odt.modules.php | 4 ++++ htdocs/core/modules/ticket/mod_ticket_simple.php | 7 ++++++- htdocs/core/modules/ticket/mod_ticket_universal.php | 7 ++++++- .../core/modules/user/doc/doc_generic_user_odt.modules.php | 4 ++++ .../usergroup/doc/doc_generic_usergroup_odt.modules.php | 4 ++++ 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index 423804b284c..a259fbbe7ee 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -45,6 +45,10 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * Dolibarr version of the loaded document + * @public string + */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/ticket/mod_ticket_simple.php b/htdocs/core/modules/ticket/mod_ticket_simple.php index aa8b4c4e3f5..a2201208534 100644 --- a/htdocs/core/modules/ticket/mod_ticket_simple.php +++ b/htdocs/core/modules/ticket/mod_ticket_simple.php @@ -30,7 +30,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/ticket/modules_ticket.php'; */ class mod_ticket_simple extends ModeleNumRefTicket { - public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + public $prefix = 'TS'; public $error = ''; public $nom = "Simple"; diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index c3dad0aa482..ee201740eed 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -29,7 +29,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/ticket/modules_ticket.php'; */ class mod_ticket_universal extends ModeleNumRefTicket { - public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + public $error = ''; public $nom = 'Universal'; public $name = 'Universal'; diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 1f993bfcd86..41fb48ecec5 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -43,6 +43,10 @@ class doc_generic_user_odt extends ModelePDFUser public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * Dolibarr version of the loaded document + * @public string + */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index ffb356cbb9b..571a12aaf7b 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -45,6 +45,10 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * Dolibarr version of the loaded document + * @public string + */ public $version = 'dolibarr'; From 46d7385c54daff2d90a74811518634d58d2b1003 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 09:13:49 +0200 Subject: [PATCH 06/46] Standardize and update code --- .../commande/doc/doc_generic_order_odt.modules.php | 7 ++++++- .../contract/doc/doc_generic_contract_odt.modules.php | 8 ++++++-- .../expedition/doc/doc_generic_shipment_odt.modules.php | 9 +++++++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 7c3ca5bd2e6..53b3731d533 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -3,6 +3,7 @@ * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García * Copyright (C) 2016 Charlie Benke + * Copyright (C) 2018 Philippe Grand * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,7 +45,11 @@ class doc_generic_order_odt extends ModelePDFCommandes */ public $emetteur; - public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index eca3f13d57f..5ba56d8b73d 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -43,7 +43,11 @@ class doc_generic_contract_odt extends ModelePDFContract */ public $emetteur; - public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document @@ -59,7 +63,7 @@ class doc_generic_contract_odt extends ModelePDFContract */ function __construct($db) { - global $conf,$langs,$mysoc; + global $conf, $langs, $mysoc; // Load translation files required by the page $langs->loadLangs(array("main","companies")); diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 729663bf625..53738f23df2 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -2,7 +2,8 @@ /* Copyright (C) 2010-2012 Laurent Destailleur * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García - * Copyright (C) 2016 Charlie Benke + * Copyright (C) 2016 Charlie Benke + * Copyright (C) 2018 Philippe Grand * * This program is free software; you can redistribute it and/or modify @@ -45,7 +46,11 @@ class doc_generic_shipment_odt extends ModelePdfExpedition */ public $emetteur; - public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document From 1adc4bad9eafb0efd731702690940a26a8373ccd Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 09:17:25 +0200 Subject: [PATCH 07/46] Standardize and update code --- .../facture/doc/doc_generic_invoice_odt.modules.php | 8 ++++++-- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 +- .../product/doc/doc_generic_product_odt.modules.php | 6 +++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 77824b75c8c..47689938fc1 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -44,7 +44,11 @@ class doc_generic_invoice_odt extends ModelePDFFactures */ public $emetteur; // Objet societe qui emet - public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document @@ -60,7 +64,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures */ function __construct($db) { - global $conf,$langs,$mysoc; + global $conf, $langs, $mysoc; // Load translation files required by the page $langs->loadLangs(array("main","companies")); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 701eee5bc17..44e88a64c17 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -138,7 +138,7 @@ class pdf_crabe extends ModelePDFFactures */ function __construct($db) { - global $conf,$langs,$mysoc; + global $conf, $langs, $mysoc; // Translations $langs->loadLangs(array("main", "bills")); diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index b11e17a6623..4e22f24d9a3 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -42,7 +42,11 @@ class doc_generic_product_odt extends ModelePDFProduct */ public $emetteur; - public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document From 0222ea7e8c746ee05b2be99c3251ff62526b55e0 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 09:19:17 +0200 Subject: [PATCH 08/46] Standardize and update code --- .../project/task/doc/doc_generic_task_odt.modules.php | 8 ++++++-- .../propale/doc/doc_generic_proposal_odt.modules.php | 8 ++++++-- .../modules/stock/doc/doc_generic_stock_odt.modules.php | 6 +++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index c881c6c5b46..f653f2fdad7 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -60,7 +60,11 @@ class doc_generic_task_odt extends ModelePDFTask */ public $emetteur; // Objet societe qui emet - public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document @@ -76,7 +80,7 @@ class doc_generic_task_odt extends ModelePDFTask */ function __construct($db) { - global $conf,$langs,$mysoc; + global $conf, $langs, $mysoc; // Load translation files required by the page $langs->loadLangs(array("main","companies")); diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 469d154ddc5..0d05f298e9c 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -43,7 +43,11 @@ class doc_generic_proposal_odt extends ModelePDFPropales */ public $emetteur; // Objet societe qui emet - public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document @@ -59,7 +63,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales */ function __construct($db) { - global $conf,$langs,$mysoc; + global $conf, $langs, $mysoc; // Load translation files required by the page $langs->loadLangs(array("main","companies")); diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index 4f9de22f975..925876185be 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -42,7 +42,11 @@ class doc_generic_stock_odt extends ModelePDFStock */ public $emetteur; - public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document From 08325d40ce3cfa5db4d7f845c96d0e80f0a94496 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 11:18:02 +0200 Subject: [PATCH 09/46] Standardize and update code --- .../doc/doc_generic_supplier_proposal_odt.modules.php | 6 +++++- .../core/modules/user/doc/doc_generic_user_odt.modules.php | 6 +++++- .../usergroup/doc/doc_generic_usergroup_odt.modules.php | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index a259fbbe7ee..b34fb7b03e6 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -43,7 +43,11 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal */ public $emetteur; - public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 41fb48ecec5..ab581553ab6 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -41,7 +41,11 @@ class doc_generic_user_odt extends ModelePDFUser */ public $emetteur; - public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index 571a12aaf7b..b89f68d755b 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -43,7 +43,11 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup */ public $emetteur; - public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document From d5a3411fbc23e89a86985c461fd6124dfa0e8448 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 11:28:54 +0200 Subject: [PATCH 10/46] Standardize and update code --- htdocs/core/modules/export/export_csv.modules.php | 7 ++++++- htdocs/core/modules/export/export_excel.modules.php | 7 ++++++- htdocs/core/modules/export/export_excel2007.modules.php | 7 ++++++- htdocs/core/modules/export/export_tsv.modules.php | 7 ++++++- htdocs/core/modules/import/import_csv.modules.php | 7 ++++++- htdocs/core/modules/import/import_xlsx.modules.php | 7 ++++++- htdocs/core/modules/import/modules_import.php | 7 ++++++- 7 files changed, 42 insertions(+), 7 deletions(-) diff --git a/htdocs/core/modules/export/export_csv.modules.php b/htdocs/core/modules/export/export_csv.modules.php index c3dfc84f94c..e433d85d2ca 100644 --- a/htdocs/core/modules/export/export_csv.modules.php +++ b/htdocs/core/modules/export/export_csv.modules.php @@ -41,7 +41,12 @@ class ExportCsv extends ModeleExports public $label; public $extension; - public $version; + + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; public $label_lib; public $version_lib; diff --git a/htdocs/core/modules/export/export_excel.modules.php b/htdocs/core/modules/export/export_excel.modules.php index 665a6925c6b..3711f5cfe54 100644 --- a/htdocs/core/modules/export/export_excel.modules.php +++ b/htdocs/core/modules/export/export_excel.modules.php @@ -43,7 +43,12 @@ class ExportExcel extends ModeleExports public $label; public $extension; - public $version; + + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; public $label_lib; public $version_lib; diff --git a/htdocs/core/modules/export/export_excel2007.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php index 74e35ff5b18..71885c37297 100644 --- a/htdocs/core/modules/export/export_excel2007.modules.php +++ b/htdocs/core/modules/export/export_excel2007.modules.php @@ -44,7 +44,12 @@ class ExportExcel2007 extends ExportExcel public $label; public $extension; - public $version; + + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; public $label_lib; public $version_lib; diff --git a/htdocs/core/modules/export/export_tsv.modules.php b/htdocs/core/modules/export/export_tsv.modules.php index 4b57d5f7fcf..b8e8f5d0763 100644 --- a/htdocs/core/modules/export/export_tsv.modules.php +++ b/htdocs/core/modules/export/export_tsv.modules.php @@ -42,7 +42,12 @@ class ExportTsv extends ModeleExports public $label; public $extension; - public $version; + + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; public $label_lib; public $version_lib; diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 2b8d2825f75..03f727e8759 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -61,7 +61,12 @@ class ImportCsv extends ModeleImports public $label; public $extension; // Extension of files imported by driver - public $version; // Version of driver + + /** + * Dolibarr version of driver + * @public string + */ + public $version = 'dolibarr'; public $label_lib; // Label of external lib used by driver public $version_lib; // Version of external lib used by driver diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index 31f09a7893f..e79ef688782 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -61,7 +61,12 @@ class ImportXlsx extends ModeleImports public $label; public $extension; // Extension of files imported by driver - public $version; // Version of driver + + /** + * Dolibarr version of driver + * @public string + */ + public $version = 'dolibarr'; public $label_lib; // Label of external lib used by driver public $version_lib; // Version of external lib used by driver diff --git a/htdocs/core/modules/import/modules_import.php b/htdocs/core/modules/import/modules_import.php index a5d73031b7a..b69ea8dcf7c 100644 --- a/htdocs/core/modules/import/modules_import.php +++ b/htdocs/core/modules/import/modules_import.php @@ -50,7 +50,12 @@ class ModeleImports public $label; public $extension; // Extension of files imported by driver - public $version; // Version of driver + + /** + * Dolibarr version of driver + * @public string + */ + public $version = 'dolibarr'; public $label_lib; // Label of external lib used by driver public $version_lib; // Version of external lib used by driver From 89b942ac9ac59ac609c93ad68c3c96f27d18329c Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 11:34:18 +0200 Subject: [PATCH 11/46] Standardize and update code --- htdocs/core/triggers/interface_20_all_Logevents.class.php | 6 ++++++ .../interface_20_modWorkflow_WorkflowManager.class.php | 5 +++++ .../triggers/interface_50_modAgenda_ActionsAuto.class.php | 5 +++++ .../interface_50_modBlockedlog_ActionsBlockedLog.class.php | 5 +++++ .../triggers/interface_50_modLdap_Ldapsynchro.class.php | 5 +++++ ...interface_50_modMailmanspip_Mailmanspipsynchro.class.php | 5 +++++ .../interface_50_modNotification_Notification.class.php | 5 +++++ 7 files changed, 36 insertions(+) diff --git a/htdocs/core/triggers/interface_20_all_Logevents.class.php b/htdocs/core/triggers/interface_20_all_Logevents.class.php index a8de26e713b..772e9b39a51 100644 --- a/htdocs/core/triggers/interface_20_all_Logevents.class.php +++ b/htdocs/core/triggers/interface_20_all_Logevents.class.php @@ -37,7 +37,13 @@ class InterfaceLogevents extends DolibarrTriggers public $picto = 'technic'; public $family = 'core'; + public $description = "Triggers of this module allows to add security event records inside Dolibarr."; + + /** + * Version of the trigger + * @var string + */ public $version = self::VERSION_DOLIBARR; /** diff --git a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php index a719ef0b4fc..90806746da8 100644 --- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php +++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php @@ -39,6 +39,11 @@ class InterfaceWorkflowManager extends DolibarrTriggers public $family = 'core'; public $description = "Triggers of this module allows to manage workflows"; + + /** + * Version of the trigger + * @var string + */ public $version = self::VERSION_DOLIBARR; /** diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 343b9a1376e..ff24f358083 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -36,6 +36,11 @@ class InterfaceActionsAuto extends DolibarrTriggers { public $family = 'agenda'; public $description = "Triggers of this module add actions in agenda according to setup made in agenda setup."; + + /** + * Version of the trigger + * @var string + */ public $version = self::VERSION_DOLIBARR; /** diff --git a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php index 82e6b9e56eb..f2c19394df9 100644 --- a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php +++ b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php @@ -32,6 +32,11 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers { public $family = 'system'; public $description = "Triggers of this module add action for BlockedLog module."; + + /** + * Version of the trigger + * @var string + */ public $version = self::VERSION_DOLIBARR; /** diff --git a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php index 376ed47c486..7d528b55c30 100644 --- a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php +++ b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php @@ -33,6 +33,11 @@ class InterfaceLdapsynchro extends DolibarrTriggers { public $family = 'ldap'; public $description = "Triggers of this module allows to synchronize Dolibarr toward a LDAP database."; + + /** + * Version of the trigger + * @var string + */ public $version = self::VERSION_DOLIBARR; /** diff --git a/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php b/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php index e551086f9e8..0197e6bf280 100644 --- a/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php +++ b/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php @@ -31,6 +31,11 @@ class InterfaceMailmanSpipsynchro extends DolibarrTriggers { public $family = 'mailmanspip'; public $description = "Triggers of this module allows to synchronize Mailman an Spip."; + + /** + * Version of the trigger + * @var string + */ public $version = self::VERSION_DOLIBARR; /** diff --git a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php index 0daf141a208..26b36964676 100644 --- a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php +++ b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php @@ -32,6 +32,11 @@ class InterfaceNotification extends DolibarrTriggers { public $family = 'notification'; public $description = "Triggers of this module send email notifications according to Notification module setup."; + + /** + * Version of the trigger + * @var string + */ public $version = self::VERSION_DOLIBARR; /** From 67147582af1ea36fc8b4c10d81742ca451ab776b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 12:00:10 +0200 Subject: [PATCH 12/46] Standardize and update code --- htdocs/core/modules/product/doc/pdf_standard.modules.php | 4 ++++ htdocs/core/modules/stock/doc/pdf_standard.modules.php | 4 ++++ htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index b163e22c712..df064738d2c 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -68,7 +68,11 @@ class pdf_standard extends ModelePDFProduct */ public $version = 'dolibarr'; + /** + * @var int page_largeur + */ public $page_largeur; + public $page_hauteur; public $format; public $marge_gauche; diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 957a4fc2e32..850668a4b20 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -68,7 +68,11 @@ class pdf_standard extends ModelePDFStock */ public $version = 'dolibarr'; + /** + * @var int page_largeur + */ public $page_largeur; + public $page_hauteur; public $format; public $marge_gauche; diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 0c9c55b5e7f..da75c85cdc8 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -69,7 +69,11 @@ class pdf_stdmovement extends ModelePDFMovement */ public $version = 'dolibarr'; + /** + * @var int page_largeur + */ public $page_largeur; + public $page_hauteur; public $format; public $marge_gauche; From 32beccc3be5024ea3e220109572a1a7f42f9f8ff Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 12:02:23 +0200 Subject: [PATCH 13/46] Standardize and update code --- htdocs/core/modules/product/doc/pdf_standard.modules.php | 4 ++++ htdocs/core/modules/stock/doc/pdf_standard.modules.php | 4 ++++ htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index df064738d2c..6de000ffac4 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -73,7 +73,11 @@ class pdf_standard extends ModelePDFProduct */ public $page_largeur; + /** + * @var int page_hauteur + */ public $page_hauteur; + public $format; public $marge_gauche; public $marge_droite; diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 850668a4b20..40739458879 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -73,7 +73,11 @@ class pdf_standard extends ModelePDFStock */ public $page_largeur; + /** + * @var int page_hauteur + */ public $page_hauteur; + public $format; public $marge_gauche; public $marge_droite; diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index da75c85cdc8..4bded6e2e6f 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -74,7 +74,11 @@ class pdf_stdmovement extends ModelePDFMovement */ public $page_largeur; + /** + * @var int page_hauteur + */ public $page_hauteur; + public $format; public $marge_gauche; public $marge_droite; From 5979db773373c171a7d5d8d03a6fd42bf3a8bcfa Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 12:07:23 +0200 Subject: [PATCH 14/46] Standardize and update code --- htdocs/core/class/commonstickergenerator.class.php | 7 +++++-- htdocs/core/modules/product/doc/pdf_standard.modules.php | 4 ++++ htdocs/core/modules/stock/doc/pdf_standard.modules.php | 4 ++++ htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php | 4 ++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonstickergenerator.class.php b/htdocs/core/class/commonstickergenerator.class.php index 6d4c32d82bb..5289ed882ff 100644 --- a/htdocs/core/class/commonstickergenerator.class.php +++ b/htdocs/core/class/commonstickergenerator.class.php @@ -61,9 +61,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/format_cards.lib.php'; */ abstract class CommonStickerGenerator { - public $code; // Code of format - public $format; // Array with informations + + /** + * @var array format Array with informations + */ + public $format; // protected var $_Avery_Name = ''; // Nom du format de l'etiquette diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index 6de000ffac4..23b112d6113 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -78,7 +78,11 @@ class pdf_standard extends ModelePDFProduct */ public $page_hauteur; + /** + * @var array format + */ public $format; + public $marge_gauche; public $marge_droite; public $marge_haute; diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 40739458879..19acd8c873d 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -78,7 +78,11 @@ class pdf_standard extends ModelePDFStock */ public $page_hauteur; + /** + * @var array format + */ public $format; + public $marge_gauche; public $marge_droite; public $marge_haute; diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 4bded6e2e6f..16a6e80ad9e 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -79,7 +79,11 @@ class pdf_stdmovement extends ModelePDFMovement */ public $page_hauteur; + /** + * @var array format + */ public $format; + public $marge_gauche; public $marge_droite; public $marge_haute; From 4b51227ca9ba4c20059777dbf8e6cd10959504ec Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 12:10:13 +0200 Subject: [PATCH 15/46] Standardize and update code --- htdocs/core/modules/product/doc/pdf_standard.modules.php | 4 ++++ htdocs/core/modules/stock/doc/pdf_standard.modules.php | 4 ++++ htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index 23b112d6113..7b9cad0c04a 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -83,7 +83,11 @@ class pdf_standard extends ModelePDFProduct */ public $format; + /** + * @var int marge_gauche + */ public $marge_gauche; + public $marge_droite; public $marge_haute; public $marge_basse; diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 19acd8c873d..943afe73ec4 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -83,7 +83,11 @@ class pdf_standard extends ModelePDFStock */ public $format; + /** + * @var int marge_gauche + */ public $marge_gauche; + public $marge_droite; public $marge_haute; public $marge_basse; diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 16a6e80ad9e..131b1ec7dfe 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -84,7 +84,11 @@ class pdf_stdmovement extends ModelePDFMovement */ public $format; + /** + * @var int marge_gauche + */ public $marge_gauche; + public $marge_droite; public $marge_haute; public $marge_basse; From d2d40ef0a3a1a8ee87fc482d23f4131e6f242566 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 12:12:37 +0200 Subject: [PATCH 16/46] Standardize and update code --- htdocs/core/modules/product/doc/pdf_standard.modules.php | 4 ++++ htdocs/core/modules/stock/doc/pdf_standard.modules.php | 4 ++++ htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index 7b9cad0c04a..d1d82fece78 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -88,7 +88,11 @@ class pdf_standard extends ModelePDFProduct */ public $marge_gauche; + /** + * @var int marge_droite + */ public $marge_droite; + public $marge_haute; public $marge_basse; diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 943afe73ec4..303739c221c 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -88,7 +88,11 @@ class pdf_standard extends ModelePDFStock */ public $marge_gauche; + /** + * @var int marge_droite + */ public $marge_droite; + public $marge_haute; public $marge_basse; diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 131b1ec7dfe..cc655678c08 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -89,7 +89,11 @@ class pdf_stdmovement extends ModelePDFMovement */ public $marge_gauche; + /** + * @var int marge_droite + */ public $marge_droite; + public $marge_haute; public $marge_basse; From bd87b1381d794d400e050bbc9e15ed5f190d5ad2 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 12:14:30 +0200 Subject: [PATCH 17/46] Standardize and update code --- htdocs/core/modules/product/doc/pdf_standard.modules.php | 4 ++++ htdocs/core/modules/stock/doc/pdf_standard.modules.php | 4 ++++ htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index d1d82fece78..a5ac7cec255 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -93,7 +93,11 @@ class pdf_standard extends ModelePDFProduct */ public $marge_droite; + /** + * @var int marge_haute + */ public $marge_haute; + public $marge_basse; /** diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 303739c221c..14d6a1015c1 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -93,7 +93,11 @@ class pdf_standard extends ModelePDFStock */ public $marge_droite; + /** + * @var int marge_haute + */ public $marge_haute; + public $marge_basse; /** diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index cc655678c08..84358355ef6 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -94,7 +94,11 @@ class pdf_stdmovement extends ModelePDFMovement */ public $marge_droite; + /** + * @var int marge_haute + */ public $marge_haute; + public $marge_basse; /** From 50073fe98d362b2c1caecc9db5ded505a14cb9bf Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 12:16:31 +0200 Subject: [PATCH 18/46] Standardize and update code --- htdocs/core/modules/product/doc/pdf_standard.modules.php | 3 +++ htdocs/core/modules/stock/doc/pdf_standard.modules.php | 3 +++ htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php | 3 +++ 3 files changed, 9 insertions(+) diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index a5ac7cec255..8d30448bf2f 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -98,6 +98,9 @@ class pdf_standard extends ModelePDFProduct */ public $marge_haute; + /** + * @var int marge_basse + */ public $marge_basse; /** diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 14d6a1015c1..ce01124211a 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -98,6 +98,9 @@ class pdf_standard extends ModelePDFStock */ public $marge_haute; + /** + * @var int marge_basse + */ public $marge_basse; /** diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 84358355ef6..2fd86069d01 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -99,6 +99,9 @@ class pdf_stdmovement extends ModelePDFMovement */ public $marge_haute; + /** + * @var int marge_basse + */ public $marge_basse; /** From d091f5e16f6ffa4ce1e8ec531232d923dffd017d Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 12:21:49 +0200 Subject: [PATCH 19/46] Standardize and update code --- .../project/doc/doc_generic_project_odt.modules.php | 9 +++++++-- .../core/modules/societe/doc/doc_generic_odt.modules.php | 8 ++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index ae162095627..cef654a057b 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -55,7 +55,12 @@ class doc_generic_project_odt extends ModelePDFProjects { var $emetteur; // Objet societe qui emet - var $phpmin = array(5,2,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); + var $version = 'dolibarr'; @@ -66,7 +71,7 @@ class doc_generic_project_odt extends ModelePDFProjects */ function __construct($db) { - global $conf,$langs,$mysoc; + global $conf, $langs, $mysoc; // Load traductions files requiredby by page $langs->loadLangs(array("companies", "main")); diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index fcbf379ccd5..ae67bb02e63 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -36,7 +36,11 @@ class doc_generic_odt extends ModeleThirdPartyDoc { var $emetteur; // Objet societe qui emet - var $phpmin = array(5,2,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); /** @@ -46,7 +50,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc */ function __construct($db) { - global $conf,$langs,$mysoc; + global $conf, $langs, $mysoc; // Load translation files required by the page $langs->loadLangs(array("main","companies")); From 803505b6b7cb0bbb60e1627cfad6be9a4ffe9fb8 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 12:27:06 +0200 Subject: [PATCH 20/46] Standardize and update code --- htdocs/compta/bank/class/account.class.php | 6 +++++- htdocs/core/modules/bank/doc/pdf_ban.modules.php | 7 ++++++- htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php | 7 ++++++- htdocs/core/modules/cheque/doc/pdf_blochet.class.php | 6 +++++- .../project/doc/doc_generic_project_odt.modules.php | 6 +++++- htdocs/core/modules/project/doc/pdf_beluga.modules.php | 6 +++++- htdocs/core/modules/project/doc/pdf_timespent.modules.php | 6 +++++- .../core/modules/societe/doc/doc_generic_odt.modules.php | 6 +++++- 8 files changed, 42 insertions(+), 8 deletions(-) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 3bd5997506e..c45067740af 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1716,7 +1716,11 @@ class AccountLine extends CommonObject public $fk_account; // Id of bank account public $bank_account_label; // Label of bank account - public $emetteur; + /** + * Issuer + * @var Societe + */ + public $emetteur; /** * Constructor diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 9a62200eb74..1a90d03c5c4 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -35,7 +35,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; class pdf_ban extends ModeleBankAccountDoc { - var $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; + var $version = 'development'; /** diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 0e954cfc28e..e9123240709 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -35,7 +35,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; class pdf_sepamandate extends ModeleBankAccountDoc { - var $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; + var $version = 'dolibarr'; /** diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index 159f8664390..c4995ead47f 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -34,7 +34,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/cheque/modules_chequereceipts.php' */ class BordereauChequeBlochet extends ModeleChequeReceipts { - var $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; /** * Constructor diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index cef654a057b..370a322346b 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -53,7 +53,11 @@ if (! empty($conf->agenda->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/ */ class doc_generic_project_odt extends ModelePDFProjects { - var $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; /** * @var array() Minimum version of PHP required by module. diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index d2a678047ab..fe33d093083 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -54,7 +54,11 @@ if (! empty($conf->agenda->enabled)) require_once DOL_DOCUMENT_ROOT.'/com class pdf_beluga extends ModelePDFProjects { - var $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; /** * Constructor diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index 74ba4775447..718e618b16d 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -37,7 +37,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; class pdf_timespent extends ModelePDFProjects { - var $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; /** * Constructor diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index ae67bb02e63..fbd4ac84e05 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -34,7 +34,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; */ class doc_generic_odt extends ModeleThirdPartyDoc { - var $emetteur; // Objet societe qui emet + /** + * Issuer + * @var Societe + */ + public $emetteur; /** * @var array() Minimum version of PHP required by module. From cbda62b1cab7c20068ed8d546effa008c8122ce5 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 12:30:38 +0200 Subject: [PATCH 21/46] Standardize and update code --- htdocs/core/modules/bank/doc/pdf_ban.modules.php | 6 +++++- .../modules/bank/doc/pdf_sepamandate.modules.php | 8 ++++++-- .../core/modules/barcode/doc/phpbarcode.modules.php | 8 ++++++-- .../modules/barcode/doc/tcpdfbarcode.modules.php | 12 ++++++++---- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 1a90d03c5c4..97a91951e81 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -41,7 +41,11 @@ class pdf_ban extends ModeleBankAccountDoc */ public $emetteur; - var $version = 'development'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'development'; /** * Constructor diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index e9123240709..f62b699b4ef 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -41,7 +41,11 @@ class pdf_sepamandate extends ModeleBankAccountDoc */ public $emetteur; - var $version = 'dolibarr'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; /** * Constructor @@ -50,7 +54,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc */ function __construct($db) { - global $conf,$langs,$mysoc; + global $conf, $langs, $mysoc; // Translations $langs->loadLangs(array("main", "bank", "withdrawals", "companies")); diff --git a/htdocs/core/modules/barcode/doc/phpbarcode.modules.php b/htdocs/core/modules/barcode/doc/phpbarcode.modules.php index 2cca0e8927d..c9068dc4d26 100644 --- a/htdocs/core/modules/barcode/doc/phpbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/phpbarcode.modules.php @@ -32,8 +32,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/barcode.lib.php'; // This is to inc */ class modPhpbarcode extends ModeleBarCode { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** * @var string Error code (or message) */ diff --git a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php index fcf01131f46..c37f87f17d5 100644 --- a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php @@ -31,14 +31,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/barcode.lib.php'; // This is to inc */ class modTcpdfbarcode extends ModeleBarCode { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** * @var string Error code (or message) */ public $error=''; - - var $is2d = false; + + public $is2d = false; /** * Return description of numbering model From 7ffcc2e63fff13fd55e50c7b07fd2bdebfa3f13b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 13:32:41 +0200 Subject: [PATCH 22/46] Standardize and update code --- .../barcode/mod_barcode_product_standard.php | 8 +++++++- .../core/modules/cheque/mod_chequereceipt_mint.php | 13 ++++++++++--- .../core/modules/cheque/mod_chequereceipt_thyme.php | 11 ++++++++--- .../core/modules/commande/mod_commande_marbre.php | 13 ++++++++++--- 4 files changed, 35 insertions(+), 10 deletions(-) diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index 42ce154c648..a7ebc8bf5e1 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -38,7 +38,13 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode var $code_modifiable_invalide; // Modified code if it is invalid var $code_modifiable_null; // Modified code if it is null var $code_null; // Optional code - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' + + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + var $code_auto; // Automatic Numbering var $searchcode; // Search string diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php index b3b6fb96b66..ba617787cbe 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php @@ -29,13 +29,20 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/cheque/modules_chequereceipts.php */ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $prefix='CHK'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix='CHK'; + /** * @var string Error code (or message) */ public $error=''; - var $name='Mint'; + + public $name='Mint'; /** diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index caf063da7d4..867b7398a51 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -30,9 +30,14 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/cheque/modules_chequereceipts.php */ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $name = 'Thyme'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; + public $name = 'Thyme'; /** diff --git a/htdocs/core/modules/commande/mod_commande_marbre.php b/htdocs/core/modules/commande/mod_commande_marbre.php index 8ff489cc5fa..bcd3b34df04 100644 --- a/htdocs/core/modules/commande/mod_commande_marbre.php +++ b/htdocs/core/modules/commande/mod_commande_marbre.php @@ -29,13 +29,20 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/commande/modules_commande.php'; */ class mod_commande_marbre extends ModeleNumRefCommandes { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $prefix='CO'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix='CO'; + /** * @var string Error code (or message) */ public $error=''; - var $nom='Marbre'; + + public $nom='Marbre'; /** From 88bf2dee642979e02e7a1b605d300fff8b15ece5 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 13:36:00 +0200 Subject: [PATCH 23/46] Standardize and update code --- .../modules/commande/mod_commande_saphir.php | 12 ++++++++--- .../modules/contract/mod_contract_magre.php | 15 ++++++++++---- .../modules/contract/mod_contract_olive.php | 20 ++++++++++++------- .../modules/contract/mod_contract_serpis.php | 16 +++++++++++---- .../expedition/mod_expedition_ribera.php | 12 ++++++++--- 5 files changed, 54 insertions(+), 21 deletions(-) diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index ae856072049..cf91dbfc36f 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -33,9 +33,15 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/commande/modules_commande.php'; */ class mod_commande_saphir extends ModeleNumRefCommandes { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $nom = 'Saphir'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; + + public $nom = 'Saphir'; /** diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php index 72c8c5bef23..5e09a57a997 100644 --- a/htdocs/core/modules/contract/mod_contract_magre.php +++ b/htdocs/core/modules/contract/mod_contract_magre.php @@ -29,10 +29,17 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/contract/modules_contract.php'; */ class mod_contract_magre extends ModelNumRefContracts { - var $version='dolibarr'; - var $error = ''; - var $nom = 'Magre'; - var $code_auto=1; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; + + public $error = ''; + + public $nom = 'Magre'; + + public $code_auto=1; /** * Return default description of numbering model diff --git a/htdocs/core/modules/contract/mod_contract_olive.php b/htdocs/core/modules/contract/mod_contract_olive.php index 6d22aebeb3d..3602a0d3291 100644 --- a/htdocs/core/modules/contract/mod_contract_olive.php +++ b/htdocs/core/modules/contract/mod_contract_olive.php @@ -34,13 +34,19 @@ class mod_contract_olive extends ModelNumRefContracts { - var $nom='Olive'; // Nom du modele - var $code_modifiable = 1; // Code modifiable - var $code_modifiable_invalide = 1; // Code modifiable si il est invalide - var $code_modifiable_null = 1; // Code modifiables si il est null - var $code_null = 1; // Code facultatif - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $code_auto = 0; // Numerotation automatique + public $nom='Olive'; // Nom du modele + public $code_modifiable = 1; // Code modifiable + public $code_modifiable_invalide = 1; // Code modifiable si il est invalide + public $code_modifiable_null = 1; // Code modifiables si il est null + public $code_null = 1; // Code facultatif + + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $code_auto = 0; // Numerotation automatique /** diff --git a/htdocs/core/modules/contract/mod_contract_serpis.php b/htdocs/core/modules/contract/mod_contract_serpis.php index ca7ba32184f..ea1064e7db6 100644 --- a/htdocs/core/modules/contract/mod_contract_serpis.php +++ b/htdocs/core/modules/contract/mod_contract_serpis.php @@ -28,14 +28,22 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/contract/modules_contract.php'; */ class mod_contract_serpis extends ModelNumRefContracts { - var $version='dolibarr'; - var $prefix='CT'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; + + public $prefix='CT'; + /** * @var string Error code (or message) */ public $error=''; - var $nom='Serpis'; - var $code_auto=1; + + public $nom='Serpis'; + + public $code_auto=1; /** diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php index dadde0fd814..973567de2fb 100644 --- a/htdocs/core/modules/expedition/mod_expedition_ribera.php +++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php @@ -29,9 +29,15 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/expedition/modules_expedition.php */ class mod_expedition_ribera extends ModelNumRefExpedition { - var $version='dolibarr'; - var $error = ''; - var $nom = 'Ribera'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; + + public $error = ''; + + public $nom = 'Ribera'; /** * Return default description of numbering model From a14c5209109d19f42ec4d648021edb5c28ac9c8d Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 13:41:26 +0200 Subject: [PATCH 24/46] Standardize and update code --- .../expedition/mod_expedition_safor.php | 13 ++++++++++--- .../expensereport/mod_expensereport_jade.php | 13 ++++++++++--- .../expensereport/mod_expensereport_sand.php | 14 ++++++++++---- .../core/modules/facture/mod_facture_mars.php | 19 ++++++++++++++----- .../modules/facture/mod_facture_mercure.php | 11 ++++++++--- .../modules/facture/mod_facture_terre.php | 16 ++++++++++++---- 6 files changed, 64 insertions(+), 22 deletions(-) diff --git a/htdocs/core/modules/expedition/mod_expedition_safor.php b/htdocs/core/modules/expedition/mod_expedition_safor.php index 2a20c22a88d..a16d3a41d07 100644 --- a/htdocs/core/modules/expedition/mod_expedition_safor.php +++ b/htdocs/core/modules/expedition/mod_expedition_safor.php @@ -28,13 +28,20 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/expedition/modules_expedition.php */ class mod_expedition_safor extends ModelNumRefExpedition { - var $version='dolibarr'; - var $prefix='SH'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; + + public $prefix='SH'; + /** * @var string Error code (or message) */ public $error=''; - var $nom='Safor'; + + public $nom='Safor'; /** diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index b1e01d40bb9..2b32fc76152 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -28,13 +28,20 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/expensereport/modules_expenserepo */ class mod_expensereport_jade extends ModeleNumRefExpenseReport { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $prefix='ER'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix='ER'; + /** * @var string Error code (or message) */ public $error=''; - var $nom='Jade'; + + public $nom='Jade'; /** diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index 4222bf163d5..67331873239 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -30,9 +30,15 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/expensereport/modules_expenserepo */ class mod_expensereport_sand extends ModeleNumRefExpenseReport { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $nom = 'Sand'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; + + public $nom = 'Sand'; /** @@ -42,7 +48,7 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport */ function info() { - global $conf,$langs; + global $conf, $langs; $langs->load("bills"); diff --git a/htdocs/core/modules/facture/mod_facture_mars.php b/htdocs/core/modules/facture/mod_facture_mars.php index 5a2d1281385..a1ed1e32d24 100644 --- a/htdocs/core/modules/facture/mod_facture_mars.php +++ b/htdocs/core/modules/facture/mod_facture_mars.php @@ -30,11 +30,20 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/facture/modules_facture.php'; */ class mod_facture_mars extends ModeleNumRefFactures { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $prefixinvoice='FA'; - var $prefixreplacement='FR'; - var $prefixdeposit='AC'; - var $prefixcreditnote='AV'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefixinvoice='FA'; + + public $prefixreplacement='FR'; + + public $prefixdeposit='AC'; + + public $prefixcreditnote='AV'; + /** * @var string Error code (or message) */ diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index 89c526bc334..c2ebf678cc7 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -33,8 +33,13 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/facture/modules_facture.php'; */ class mod_facture_mercure extends ModeleNumRefFactures { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; /** @@ -44,7 +49,7 @@ class mod_facture_mercure extends ModeleNumRefFactures */ function info() { - global $conf,$langs; + global $conf, $langs; $langs->load("bills"); diff --git a/htdocs/core/modules/facture/mod_facture_terre.php b/htdocs/core/modules/facture/mod_facture_terre.php index 524eeebdd5f..a55418a8cb5 100644 --- a/htdocs/core/modules/facture/mod_facture_terre.php +++ b/htdocs/core/modules/facture/mod_facture_terre.php @@ -29,10 +29,18 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/facture/modules_facture.php'; */ class mod_facture_terre extends ModeleNumRefFactures { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $prefixinvoice='FA'; - var $prefixcreditnote='AV'; - var $prefixdeposit='AC'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefixinvoice='FA'; + + public $prefixcreditnote='AV'; + + public $prefixdeposit='AC'; + /** * @var string Error code (or message) */ From 7b50935e499b7fbd56368f841a0f2c3205f56bce Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 13:44:45 +0200 Subject: [PATCH 25/46] Standardize and update code --- htdocs/core/modules/fichinter/mod_arctic.php | 14 ++++++++++---- htdocs/core/modules/fichinter/mod_pacific.php | 13 ++++++++++--- .../modules/holiday/mod_holiday_immaculate.php | 17 ++++++++++++----- .../modules/holiday/mod_holiday_madonna.php | 16 ++++++++++++---- 4 files changed, 44 insertions(+), 16 deletions(-) diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index 3e6193e0740..e11b6cc739c 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -32,9 +32,15 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/fichinter/modules_fichinter.php'; */ class mod_arctic extends ModeleNumRefFicheinter { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $nom = 'arctic'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; + + public $nom = 'arctic'; /** @@ -44,7 +50,7 @@ class mod_arctic extends ModeleNumRefFicheinter */ function info() { - global $conf,$langs; + global $conf, $langs; $langs->load("bills"); diff --git a/htdocs/core/modules/fichinter/mod_pacific.php b/htdocs/core/modules/fichinter/mod_pacific.php index c412c1d340c..67539837362 100644 --- a/htdocs/core/modules/fichinter/mod_pacific.php +++ b/htdocs/core/modules/fichinter/mod_pacific.php @@ -30,13 +30,20 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/fichinter/modules_fichinter.php'; */ class mod_pacific extends ModeleNumRefFicheinter { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $prefix='FI'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix='FI'; + /** * @var string Error code (or message) */ public $error=''; - var $nom = 'pacific'; + + public $nom = 'pacific'; /** diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php index 16b7adce4ac..8d712253a8d 100644 --- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php +++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php @@ -30,10 +30,17 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/holiday/modules_holiday.php'; */ class mod_holiday_immaculate extends ModelNumRefHolidays { - var $version='dolibarr'; - var $error = ''; - var $nom = 'Immaculate'; - var $code_auto=1; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; + + public $error = ''; + + public $nom = 'Immaculate'; + + public $code_auto=1; /** * Return default description of numbering model @@ -42,7 +49,7 @@ class mod_holiday_immaculate extends ModelNumRefHolidays */ function info() { - global $conf,$langs; + global $conf, $langs; $langs->load("bills"); diff --git a/htdocs/core/modules/holiday/mod_holiday_madonna.php b/htdocs/core/modules/holiday/mod_holiday_madonna.php index ba951bb557c..eaafade561f 100644 --- a/htdocs/core/modules/holiday/mod_holiday_madonna.php +++ b/htdocs/core/modules/holiday/mod_holiday_madonna.php @@ -29,14 +29,22 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/holiday/modules_holiday.php'; */ class mod_holiday_madonna extends ModelNumRefHolidays { - var $version='dolibarr'; - var $prefix='HL'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; + + public $prefix='HL'; + /** * @var string Error code (or message) */ public $error=''; - var $nom='Madonna'; - var $code_auto=1; + + public $nom='Madonna'; + + public $code_auto=1; /** From c0dc4f3a48edcf1a01da1779b72c730b177319fd Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 13:52:57 +0200 Subject: [PATCH 26/46] Standardize and update code --- .../modules/livraison/mod_livraison_jade.php | 14 +++++--- .../livraison/mod_livraison_saphir.php | 12 +++++-- .../core/modules/payment/mod_payment_ant.php | 14 +++++--- .../modules/payment/mod_payment_cicada.php | 13 +++++-- .../product/mod_codeproduct_elephant.php | 35 +++++++++++++------ .../product/mod_codeproduct_leopard.php | 27 +++++++++----- 6 files changed, 82 insertions(+), 33 deletions(-) diff --git a/htdocs/core/modules/livraison/mod_livraison_jade.php b/htdocs/core/modules/livraison/mod_livraison_jade.php index 2bc64bdcb63..7578ed2728f 100644 --- a/htdocs/core/modules/livraison/mod_livraison_jade.php +++ b/htdocs/core/modules/livraison/mod_livraison_jade.php @@ -34,11 +34,17 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/livraison/modules_livraison.php'; class mod_livraison_jade extends ModeleNumRefDeliveryOrder { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $nom = "Jade"; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - var $prefix='BL'; + public $error = ''; + + public $nom = "Jade"; + + public $prefix='BL'; /** diff --git a/htdocs/core/modules/livraison/mod_livraison_saphir.php b/htdocs/core/modules/livraison/mod_livraison_saphir.php index bad82554ff3..4c43f8c6136 100644 --- a/htdocs/core/modules/livraison/mod_livraison_saphir.php +++ b/htdocs/core/modules/livraison/mod_livraison_saphir.php @@ -31,9 +31,15 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/livraison/modules_livraison.php'; */ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $nom = 'Saphir'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; + + public $nom = 'Saphir'; /** diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index d059f0ccebc..1c6bcdc4150 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -30,9 +30,15 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/payment/modules_payment.php'; */ class mod_payment_ant extends ModeleNumRefPayments { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $nom = 'Ant'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; + + public $nom = 'Ant'; /** @@ -42,7 +48,7 @@ class mod_payment_ant extends ModeleNumRefPayments */ function info() { - global $conf,$langs; + global $conf, $langs; $langs->load("bills"); diff --git a/htdocs/core/modules/payment/mod_payment_cicada.php b/htdocs/core/modules/payment/mod_payment_cicada.php index 5e87f33f8c1..1fce35f93cb 100644 --- a/htdocs/core/modules/payment/mod_payment_cicada.php +++ b/htdocs/core/modules/payment/mod_payment_cicada.php @@ -29,13 +29,20 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/payment/modules_payment.php'; */ class mod_payment_cicada extends ModeleNumRefPayments { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $prefix='PAY'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix='PAY'; + /** * @var string Error code (or message) */ public $error=''; - var $nom='Cicada'; + + public $nom='Cicada'; /** diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index f55595a63d5..8910805b3cb 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -34,18 +34,31 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/product/modules_product.class.php' */ class mod_codeproduct_elephant extends ModeleProductCode { - var $nom='Elephant'; // Nom du modele - var $name='Elephant'; // Nom du modele - var $code_modifiable; // Code modifiable - var $code_modifiable_invalide; // Code modifiable si il est invalide - var $code_modifiable_null; // Code modifiables si il est null - var $code_null; // Code facultatif - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $code_auto; // Numerotation automatique + public $nom='Elephant'; // Nom du modele - var $searchcode; // String de recherche - var $numbitcounter; // Nombre de chiffres du compteur - var $prefixIsRequired; // Le champ prefix du tiers doit etre renseigne quand on utilise {pre} + public $name='Elephant'; // Nom du modele + + public $code_modifiable; // Code modifiable + + public $code_modifiable_invalide; // Code modifiable si il est invalide + + public $code_modifiable_null; // Code modifiables si il est null + + public $code_null; // Code facultatif + + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $code_auto; // Numerotation automatique + + public $searchcode; // String de recherche + + public $numbitcounter; // Nombre de chiffres du compteur + + public $prefixIsRequired; // Le champ prefix du tiers doit etre renseigne quand on utilise {pre} /** diff --git a/htdocs/core/modules/product/mod_codeproduct_leopard.php b/htdocs/core/modules/product/mod_codeproduct_leopard.php index 3b850e1ba91..de9d281c92f 100644 --- a/htdocs/core/modules/product/mod_codeproduct_leopard.php +++ b/htdocs/core/modules/product/mod_codeproduct_leopard.php @@ -39,14 +39,25 @@ class mod_codeproduct_leopard extends ModeleProductCode * Le fonctionnement de celui-ci doit donc rester le plus ouvert possible */ - var $nom='Leopard'; // Nom du modele - var $name='Leopard'; // Nom du modele - var $code_modifiable; // Code modifiable - var $code_modifiable_invalide; // Code modifiable si il est invalide - var $code_modifiable_null; // Code modifiables si il est null - var $code_null; // Code facultatif - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $code_auto; // Numerotation automatique + public $nom='Leopard'; // Nom du modele + + public $name='Leopard'; // Nom du modele + + public $code_modifiable; // Code modifiable + + public $code_modifiable_invalide; // Code modifiable si il est invalide + + public $code_modifiable_null; // Code modifiables si il est null + + public $code_null; // Code facultatif + + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $code_auto; // Numerotation automatique /** From bb0a830b78b846343d02ceb70b5b84102f48fd65 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 13:56:18 +0200 Subject: [PATCH 27/46] Standardize and update code --- .../doc/doc_generic_project_odt.modules.php | 6 +++++- .../core/modules/project/mod_project_simple.php | 16 ++++++++++++---- .../modules/project/mod_project_universal.php | 17 ++++++++++++----- .../modules/project/task/mod_task_simple.php | 16 ++++++++++++---- .../modules/project/task/mod_task_universal.php | 15 +++++++++++---- 5 files changed, 52 insertions(+), 18 deletions(-) diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index 370a322346b..a350f643e9e 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -65,7 +65,11 @@ class doc_generic_project_odt extends ModelePDFProjects */ public $phpmin = array(5, 4); - var $version = 'dolibarr'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; /** diff --git a/htdocs/core/modules/project/mod_project_simple.php b/htdocs/core/modules/project/mod_project_simple.php index 33fce830397..8fef9abd7bd 100644 --- a/htdocs/core/modules/project/mod_project_simple.php +++ b/htdocs/core/modules/project/mod_project_simple.php @@ -31,14 +31,22 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/project/modules_project.php'; */ class mod_project_simple extends ModeleNumRefProjects { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $prefix='PJ'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix='PJ'; + /** * @var string Error code (or message) */ public $error=''; - var $nom = "Simple"; - var $name = "Simple"; + + public $nom = "Simple"; + + public $name = "Simple"; /** diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index a5526d9f033..2426da13e87 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -30,10 +30,17 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/project/modules_project.php'; */ class mod_project_universal extends ModeleNumRefProjects { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $nom = 'Universal'; - var $name = 'Universal'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; + + public $nom = 'Universal'; + + public $name = 'Universal'; /** @@ -43,7 +50,7 @@ class mod_project_universal extends ModeleNumRefProjects */ function info() { - global $conf,$langs; + global $conf, $langs; // Load translation files required by the page $langs->loadLangs(array("projects","admin")); diff --git a/htdocs/core/modules/project/task/mod_task_simple.php b/htdocs/core/modules/project/task/mod_task_simple.php index 76cade72785..009449e36c4 100644 --- a/htdocs/core/modules/project/task/mod_task_simple.php +++ b/htdocs/core/modules/project/task/mod_task_simple.php @@ -31,14 +31,22 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/project/task/modules_task.php'; */ class mod_task_simple extends ModeleNumRefTask { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $prefix='TK'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix='TK'; + /** * @var string Error code (or message) */ public $error=''; - var $nom = "Simple"; - var $name = "Simple"; + + public $nom = "Simple"; + + public $name = "Simple"; /** diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index 5fcb39c9b83..e0d82164585 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -30,10 +30,17 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/project/task/modules_task.php'; */ class mod_task_universal extends ModeleNumRefTask { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $nom = 'Universal'; - var $name = 'Universal'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; + + public $nom = 'Universal'; + + public $name = 'Universal'; /** From 4bd0af7a880ceba1d8d84da920614b445bbb80b1 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 14:05:57 +0200 Subject: [PATCH 28/46] Standardize and update code --- .../modules/propale/mod_propale_marbre.php | 13 +++++-- .../modules/propale/mod_propale_saphir.php | 14 +++++--- .../societe/mod_codeclient_elephant.php | 35 +++++++++++++------ .../societe/mod_codeclient_leopard.php | 27 +++++++++----- .../modules/societe/mod_codeclient_monkey.php | 35 +++++++++++++------ .../societe/mod_codecompta_aquarium.php | 17 ++++++--- .../societe/mod_codecompta_panicum.php | 12 +++++-- 7 files changed, 108 insertions(+), 45 deletions(-) diff --git a/htdocs/core/modules/propale/mod_propale_marbre.php b/htdocs/core/modules/propale/mod_propale_marbre.php index fe63b28f843..d6ff9a831b8 100644 --- a/htdocs/core/modules/propale/mod_propale_marbre.php +++ b/htdocs/core/modules/propale/mod_propale_marbre.php @@ -31,13 +31,20 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/propale/modules_propale.php'; */ class mod_propale_marbre extends ModeleNumRefPropales { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $prefix='PR'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix='PR'; + /** * @var string Error code (or message) */ public $error=''; - var $nom = "Marbre"; + + public $nom = "Marbre"; /** diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index 52dba1beac5..b00011bdc42 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -33,9 +33,15 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/propale/modules_propale.php'; */ class mod_propale_saphir extends ModeleNumRefPropales { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $nom = 'Saphir'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; + + public $nom = 'Saphir'; /** @@ -45,7 +51,7 @@ class mod_propale_saphir extends ModeleNumRefPropales */ function info() { - global $conf,$langs; + global $conf, $langs; $langs->load("bills"); diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index 5aba06db359..d02ac478146 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -34,18 +34,31 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php' */ class mod_codeclient_elephant extends ModeleThirdPartyCode { - var $nom='Elephant'; // Nom du modele - var $name='Elephant'; // Nom du modele - var $code_modifiable; // Code modifiable - var $code_modifiable_invalide; // Code modifiable si il est invalide - var $code_modifiable_null; // Code modifiables si il est null - var $code_null; // Code facultatif - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $code_auto; // Numerotation automatique + public $nom='Elephant'; // Nom du modele - var $searchcode; // String de recherche - var $numbitcounter; // Nombre de chiffres du compteur - var $prefixIsRequired; // Le champ prefix du tiers doit etre renseigne quand on utilise {pre} + public $name='Elephant'; // Nom du modele + + public $code_modifiable; // Code modifiable + + public $code_modifiable_invalide; // Code modifiable si il est invalide + + public $code_modifiable_null; // Code modifiables si il est null + + public $code_null; // Code facultatif + + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $code_auto; // Numerotation automatique + + public $searchcode; // String de recherche + + public $numbitcounter; // Nombre de chiffres du compteur + + public $prefixIsRequired; // Le champ prefix du tiers doit etre renseigne quand on utilise {pre} /** diff --git a/htdocs/core/modules/societe/mod_codeclient_leopard.php b/htdocs/core/modules/societe/mod_codeclient_leopard.php index 94c9c04d2e2..b9f214c0623 100644 --- a/htdocs/core/modules/societe/mod_codeclient_leopard.php +++ b/htdocs/core/modules/societe/mod_codeclient_leopard.php @@ -38,14 +38,25 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode * Le fonctionnement de celui-ci doit donc rester le plus ouvert possible */ - var $nom='Leopard'; // Nom du modele - var $name='Leopard'; // Nom du modele - var $code_modifiable; // Code modifiable - var $code_modifiable_invalide; // Code modifiable si il est invalide - var $code_modifiable_null; // Code modifiables si il est null - var $code_null; // Code facultatif - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $code_auto; // Numerotation automatique + public $nom='Leopard'; // Nom du modele + + public $name='Leopard'; // Nom du modele + + public $code_modifiable; // Code modifiable + + public $code_modifiable_invalide; // Code modifiable si il est invalide + + public $code_modifiable_null; // Code modifiables si il est null + + public $code_null; // Code facultatif + + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $code_auto; // Numerotation automatique /** diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index eb7fb0184f4..639aff8bc53 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -32,18 +32,31 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php' */ class mod_codeclient_monkey extends ModeleThirdPartyCode { - var $nom='Monkey'; // Nom du modele - var $name='Monkey'; // Nom du modele - var $code_modifiable; // Code modifiable - var $code_modifiable_invalide; // Code modifiable si il est invalide - var $code_modifiable_null; // Code modifiables si il est null - var $code_null; // Code facultatif - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $code_auto; // Numerotation automatique + public $nom='Monkey'; // Nom du modele - var $prefixcustomer='CU'; - var $prefixsupplier='SU'; - var $prefixIsRequired; // Le champ prefix du tiers doit etre renseigne quand on utilise {pre} + public $name='Monkey'; // Nom du modele + + public $code_modifiable; // Code modifiable + + public $code_modifiable_invalide; // Code modifiable si il est invalide + + public $code_modifiable_null; // Code modifiables si il est null + + public $code_null; // Code facultatif + + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $code_auto; // Numerotation automatique + + public $prefixcustomer='CU'; + + public $prefixsupplier='SU'; + + public $prefixIsRequired; // Le champ prefix du tiers doit etre renseigne quand on utilise {pre} /** diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php index f6a2a08bee7..ff759cc5cc2 100644 --- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php +++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php @@ -31,12 +31,19 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php' */ class mod_codecompta_aquarium extends ModeleAccountancyCode { - var $nom='Aquarium'; - var $name='Aquarium'; - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' + public $nom='Aquarium'; - var $prefixcustomeraccountancycode; - var $prefixsupplieraccountancycode; + public $name='Aquarium'; + + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefixcustomeraccountancycode; + + public $prefixsupplieraccountancycode; /** diff --git a/htdocs/core/modules/societe/mod_codecompta_panicum.php b/htdocs/core/modules/societe/mod_codecompta_panicum.php index 2dd6a81de02..3919539d8d0 100644 --- a/htdocs/core/modules/societe/mod_codecompta_panicum.php +++ b/htdocs/core/modules/societe/mod_codecompta_panicum.php @@ -30,9 +30,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php' */ class mod_codecompta_panicum extends ModeleAccountancyCode { - var $nom='Panicum'; - var $name='Panicum'; - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' + public $nom='Panicum'; + + public $name='Panicum'; + + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' /** From 0b4a0ac66738c0fa9db7a73c5e6fb1b50fbd02de Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 14:09:25 +0200 Subject: [PATCH 29/46] Standardize and update code --- .../societe/mod_codeclient_elephant.php | 2 +- .../mod_facture_fournisseur_cactus.php | 23 +++++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index d02ac478146..312526e93a1 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -3,7 +3,7 @@ * Copyright (C) 2006-2009 Laurent Destailleur * Copyright (C) 2007-2012 Regis Houssin * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2013 Philippe Grand + * Copyright (C) 2013-2018 Philippe Grand * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php index 2eaa85261d0..24c66752314 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2013 Philippe Grand + * Copyright (C) 2013-2018 Philippe Grand * Copyright (C) 2016 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify @@ -33,12 +33,21 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/supplier_invoice/modules_facturef */ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $nom = 'Cactus'; - var $prefixinvoice='SI'; - var $prefixcreditnote='SA'; - var $prefixdeposit='SD'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; + + public $nom = 'Cactus'; + + public $prefixinvoice='SI'; + + public $prefixcreditnote='SA'; + + public $prefixdeposit='SD'; /** From 12b56d17baabee4471eafe391654be60d3bc4fd9 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 14:11:59 +0200 Subject: [PATCH 30/46] Standardize and update code --- .../mod_facture_fournisseur_tulip.php | 14 ++++++++++---- .../mod_commande_fournisseur_muguet.php | 15 +++++++++++---- .../mod_commande_fournisseur_orchidee.php | 14 ++++++++++---- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index 9f4a5b6bbe7..6eff4a8f378 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -36,9 +36,15 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/supplier_invoice/modules_facturef */ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $nom = 'Tulip'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; + + public $nom = 'Tulip'; /** @@ -48,7 +54,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices */ function info() { - global $conf,$langs; + global $conf, $langs; // Load translation files required by the page $langs->loadLangs(array("bills","admin")); diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php index 60612e90259..f406b81b477 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php @@ -31,10 +31,17 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/supplier_order/modules_commandefo */ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $nom = 'Muguet'; - var $prefix='CF'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; + + public $nom = 'Muguet'; + + public $prefix='CF'; /** diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index fb800d1d63d..d8cd1d1f51b 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -32,9 +32,15 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/supplier_order/modules_commandefo */ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $nom = 'Orchidee'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; + + public $nom = 'Orchidee'; /** @@ -44,7 +50,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders */ function info() { - global $conf,$langs; + global $conf, $langs; // Load translation files required by the page $langs->loadLangs(array("bills","admin")); From cf8e12ced27e9784187947bd49eae7a1b48b0bae Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 14:15:39 +0200 Subject: [PATCH 31/46] Standardize and update code --- .../mod_supplier_payment_brodator.php | 14 ++++++++++---- .../mod_supplier_payment_bronan.php | 13 ++++++++++--- .../mod_supplier_proposal_marbre.php | 13 ++++++++++--- .../mod_supplier_proposal_saphir.php | 14 ++++++++++---- 4 files changed, 40 insertions(+), 14 deletions(-) diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index af69210945e..32c0d161fd1 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -30,9 +30,15 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/supplier_payment/modules_supplier */ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $nom = 'Brodator'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; + + public $nom = 'Brodator'; /** @@ -42,7 +48,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments */ function info() { - global $conf,$langs; + global $conf, $langs; $langs->load("bills"); diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php index 3126e3df13c..d517e8fb55e 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php @@ -29,13 +29,20 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/supplier_payment/modules_supplier */ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $prefix='SPAY'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix='SPAY'; + /** * @var string Error code (or message) */ public $error=''; - var $nom='Bronan'; + + public $nom='Bronan'; /** diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php index b821805f1f9..502b66e17f0 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php @@ -31,13 +31,20 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/supplier_proposal/modules_supplie */ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $prefix='RQ'; // RQ = Request for quotation + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix='RQ'; // RQ = Request for quotation + /** * @var string Error code (or message) */ public $error=''; - var $nom = "Marbre"; + + public $nom = "Marbre"; /** diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index 1a5995b8fc9..6619771f0a1 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -33,9 +33,15 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/supplier_proposal/modules_supplie */ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal { - var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' - var $error = ''; - var $nom = 'Saphir'; + /** + * Dolibarr version of the loaded document + * @public string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $error = ''; + + public $nom = 'Saphir'; /** @@ -45,7 +51,7 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal */ function info() { - global $conf,$langs; + global $conf, $langs; $langs->load("bills"); From 11f254cd143e122cb9dff21358f26bc7d2aa61ee Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 14:19:52 +0200 Subject: [PATCH 32/46] Standardize and update code --- htdocs/blockedlog/class/blockedlog.class.php | 3 +++ htdocs/core/modules/cheque/mod_chequereceipt_thyme.php | 6 +++++- htdocs/core/modules/commande/mod_commande_saphir.php | 5 ++++- htdocs/core/modules/contract/mod_contract_magre.php | 3 +++ htdocs/core/modules/expedition/mod_expedition_ribera.php | 5 ++++- .../core/modules/expensereport/mod_expensereport_sand.php | 3 +++ htdocs/core/modules/facture/mod_facture_mercure.php | 5 ++++- htdocs/core/modules/fichinter/mod_arctic.php | 3 +++ 8 files changed, 29 insertions(+), 4 deletions(-) diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index dab99d80bc9..eb2070d703a 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -46,6 +46,9 @@ class BlockedLog */ public $entity; + /** + * @var string Error message + */ public $error = ''; /** diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index 867b7398a51..6e211fb4ace 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -36,7 +36,11 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string Error message + */ public $error = ''; + public $name = 'Thyme'; @@ -47,7 +51,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts */ function info() { - global $conf,$langs; + global $conf, $langs; $langs->load("bills"); diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index cf91dbfc36f..6850fa2c57d 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -39,6 +39,9 @@ class mod_commande_saphir extends ModeleNumRefCommandes */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string Error message + */ public $error = ''; public $nom = 'Saphir'; @@ -51,7 +54,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes */ function info() { - global $conf,$langs; + global $conf, $langs; $langs->load("bills"); diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php index 5e09a57a997..ef6d100c2b6 100644 --- a/htdocs/core/modules/contract/mod_contract_magre.php +++ b/htdocs/core/modules/contract/mod_contract_magre.php @@ -35,6 +35,9 @@ class mod_contract_magre extends ModelNumRefContracts */ public $version = 'dolibarr'; + /** + * @var string Error message + */ public $error = ''; public $nom = 'Magre'; diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php index 973567de2fb..48f21d037eb 100644 --- a/htdocs/core/modules/expedition/mod_expedition_ribera.php +++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php @@ -35,6 +35,9 @@ class mod_expedition_ribera extends ModelNumRefExpedition */ public $version = 'dolibarr'; + /** + * @var string Error message + */ public $error = ''; public $nom = 'Ribera'; @@ -46,7 +49,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition */ function info() { - global $conf,$langs; + global $conf, $langs; $langs->load("bills"); diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index 67331873239..f3a818620b3 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -36,6 +36,9 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string Error message + */ public $error = ''; public $nom = 'Sand'; diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index c2ebf678cc7..dabd3fbd576 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -39,7 +39,10 @@ class mod_facture_mercure extends ModeleNumRefFactures */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $error = ''; + /** + * @var string Error message + */ + public $error = ''; /** diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index e11b6cc739c..0c986ef4ce6 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -38,6 +38,9 @@ class mod_arctic extends ModeleNumRefFicheinter */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string Error message + */ public $error = ''; public $nom = 'arctic'; From 7903a64c36d777ddd6ecb823906e168dfa9f43fe Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 14:23:09 +0200 Subject: [PATCH 33/46] Standardize and update code --- htdocs/core/modules/holiday/mod_holiday_immaculate.php | 3 +++ htdocs/core/modules/livraison/mod_livraison_jade.php | 3 +++ htdocs/core/modules/livraison/mod_livraison_saphir.php | 3 +++ htdocs/core/modules/payment/mod_payment_ant.php | 3 +++ htdocs/core/modules/project/mod_project_universal.php | 5 ++++- htdocs/core/modules/project/task/mod_task_universal.php | 5 ++++- htdocs/core/modules/propale/mod_propale_saphir.php | 5 ++++- .../supplier_invoice/mod_facture_fournisseur_cactus.php | 5 ++++- .../supplier_invoice/mod_facture_fournisseur_tulip.php | 5 ++++- 9 files changed, 32 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php index 8d712253a8d..9f74e6d1419 100644 --- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php +++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php @@ -36,6 +36,9 @@ class mod_holiday_immaculate extends ModelNumRefHolidays */ public $version = 'dolibarr'; + /** + * @var string Error message + */ public $error = ''; public $nom = 'Immaculate'; diff --git a/htdocs/core/modules/livraison/mod_livraison_jade.php b/htdocs/core/modules/livraison/mod_livraison_jade.php index 7578ed2728f..eed356336b0 100644 --- a/htdocs/core/modules/livraison/mod_livraison_jade.php +++ b/htdocs/core/modules/livraison/mod_livraison_jade.php @@ -40,6 +40,9 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string Error message + */ public $error = ''; public $nom = "Jade"; diff --git a/htdocs/core/modules/livraison/mod_livraison_saphir.php b/htdocs/core/modules/livraison/mod_livraison_saphir.php index 4c43f8c6136..1a07341c520 100644 --- a/htdocs/core/modules/livraison/mod_livraison_saphir.php +++ b/htdocs/core/modules/livraison/mod_livraison_saphir.php @@ -37,6 +37,9 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string Error message + */ public $error = ''; public $nom = 'Saphir'; diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index 1c6bcdc4150..cc66b39e4f4 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -36,6 +36,9 @@ class mod_payment_ant extends ModeleNumRefPayments */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string Error message + */ public $error = ''; public $nom = 'Ant'; diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index 2426da13e87..f9ce0b38c62 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -36,7 +36,10 @@ class mod_project_universal extends ModeleNumRefProjects */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $error = ''; + /** + * @var string Error code (or message) + */ + public $error = ''; public $nom = 'Universal'; diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index e0d82164585..4ffb0424d8a 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -36,7 +36,10 @@ class mod_task_universal extends ModeleNumRefTask */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $error = ''; + /** + * @var string Error code (or message) + */ + public $error = ''; public $nom = 'Universal'; diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index b00011bdc42..fab4d2b86e7 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -39,7 +39,10 @@ class mod_propale_saphir extends ModeleNumRefPropales */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $error = ''; + /** + * @var string Error code (or message) + */ + public $error = ''; public $nom = 'Saphir'; diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php index 24c66752314..618079160b7 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php @@ -39,7 +39,10 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $error = ''; + /** + * @var string Error code (or message) + */ + public $error = ''; public $nom = 'Cactus'; diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index 6eff4a8f378..28c18c96e2f 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -42,7 +42,10 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $error = ''; + /** + * @var string Error code (or message) + */ + public $error = ''; public $nom = 'Tulip'; From 7c9215763678a68178ba10bc2e3728bec92ab598 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 14:25:53 +0200 Subject: [PATCH 34/46] Standardize and update code --- .../supplier_order/mod_commande_fournisseur_muguet.php | 5 ++++- .../supplier_order/mod_commande_fournisseur_orchidee.php | 5 ++++- .../supplier_payment/mod_supplier_payment_brodator.php | 5 ++++- .../supplier_proposal/mod_supplier_proposal_saphir.php | 5 ++++- htdocs/core/modules/ticket/mod_ticket_simple.php | 6 ++++++ htdocs/core/modules/ticket/mod_ticket_universal.php | 5 +++++ htdocs/core/modules/ticket/modules_ticket.php | 3 +++ .../modulebuilder/template/class/actions_mymodule.class.php | 4 +++- 8 files changed, 33 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php index f406b81b477..e981ce35a2e 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php @@ -37,7 +37,10 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $error = ''; + /** + * @var string Error code (or message) + */ + public $error = ''; public $nom = 'Muguet'; diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index d8cd1d1f51b..1b265541789 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -38,7 +38,10 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $error = ''; + /** + * @var string Error code (or message) + */ + public $error = ''; public $nom = 'Orchidee'; diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index 32c0d161fd1..594fbad1ec6 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -36,7 +36,10 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $error = ''; + /** + * @var string Error code (or message) + */ + public $error = ''; public $nom = 'Brodator'; diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index 6619771f0a1..0968fe10e11 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -39,7 +39,10 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $error = ''; + /** + * @var string Error code (or message) + */ + public $error = ''; public $nom = 'Saphir'; diff --git a/htdocs/core/modules/ticket/mod_ticket_simple.php b/htdocs/core/modules/ticket/mod_ticket_simple.php index a2201208534..68b62e8afcb 100644 --- a/htdocs/core/modules/ticket/mod_ticket_simple.php +++ b/htdocs/core/modules/ticket/mod_ticket_simple.php @@ -37,8 +37,14 @@ class mod_ticket_simple extends ModeleNumRefTicket public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' public $prefix = 'TS'; + + /** + * @var string Error code (or message) + */ public $error = ''; + public $nom = "Simple"; + public $name = "Simple"; /** diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index ee201740eed..ece0959d050 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -35,8 +35,13 @@ class mod_ticket_universal extends ModeleNumRefTicket */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string Error code (or message) + */ public $error = ''; + public $nom = 'Universal'; + public $name = 'Universal'; /** diff --git a/htdocs/core/modules/ticket/modules_ticket.php b/htdocs/core/modules/ticket/modules_ticket.php index d6f8b06d0e8..28587825d34 100644 --- a/htdocs/core/modules/ticket/modules_ticket.php +++ b/htdocs/core/modules/ticket/modules_ticket.php @@ -29,6 +29,9 @@ */ abstract class ModeleNumRefTicket { + /** + * @var string Error code (or message) + */ public $error = ''; /** diff --git a/htdocs/modulebuilder/template/class/actions_mymodule.class.php b/htdocs/modulebuilder/template/class/actions_mymodule.class.php index 45008aa76f3..7d85d804d25 100644 --- a/htdocs/modulebuilder/template/class/actions_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/actions_mymodule.class.php @@ -32,10 +32,12 @@ class ActionsMyModule * @var DoliDB Database handler. */ public $db; + /** - * @var string Error + * @var string Error code (or message) */ public $error = ''; + /** * @var array Errors */ From 49fe6d3b79e0f89ecd8f2529c989db5dd1d8579c Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 14:43:54 +0200 Subject: [PATCH 35/46] Standardize and update code --- htdocs/core/modules/action/rapport.pdf.php | 26 ++++++++++++------- .../barcode/mod_barcode_product_standard.php | 24 ++++++++++------- .../modules/commande/mod_commande_marbre.php | 10 +++++++ .../modules/commande/mod_commande_saphir.php | 12 ++++++++- .../modules/contract/mod_contract_magre.php | 12 ++++++++- 5 files changed, 63 insertions(+), 21 deletions(-) diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.pdf.php index a72c6c5af94..66c4f0a3e45 100644 --- a/htdocs/core/modules/action/rapport.pdf.php +++ b/htdocs/core/modules/action/rapport.pdf.php @@ -45,17 +45,23 @@ class CommActionRapport */ public $description; - var $date_edition; - var $year; - var $month; + public $date_edition; - var $title; - var $subject; + public $year; - var $marge_gauche; - var $marge_droite; - var $marge_haute; - var $marge_basse; + public $month; + + public $title; + + public $subject; + + public $marge_gauche; + + public $marge_droite; + + public $marge_haute; + + public $marge_basse; /** @@ -67,7 +73,7 @@ class CommActionRapport */ function __construct($db, $month, $year) { - global $conf,$langs; + global $conf, $langs; // Load translation files required by the page $langs->loadLangs(array("commercial","projects")); diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index a7ebc8bf5e1..886ff87520a 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -33,11 +33,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/barcode/modules_barcode.class.php' */ class mod_barcode_product_standard extends ModeleNumRefBarCode { - var $name='Standard'; // Model Name - var $code_modifiable; // Editable code - var $code_modifiable_invalide; // Modified code if it is invalid - var $code_modifiable_null; // Modified code if it is null - var $code_null; // Optional code + public $name='Standard'; // Model Name + + public $code_modifiable; // Editable code + + public $code_modifiable_invalide; // Modified code if it is invalid + + public $code_modifiable_null; // Modified code if it is null + + public $code_null; // Optional code /** * Dolibarr version of the loaded document @@ -45,11 +49,13 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - var $code_auto; // Automatic Numbering + public $code_auto; // Automatic Numbering - var $searchcode; // Search string - var $numbitcounter; // Number of digits the counter - var $prefixIsRequired; // The prefix field of third party must be filled when using {pre} + public $searchcode; // Search string + + public $numbitcounter; // Number of digits the counter + + public $prefixIsRequired; // The prefix field of third party must be filled when using {pre} /** diff --git a/htdocs/core/modules/commande/mod_commande_marbre.php b/htdocs/core/modules/commande/mod_commande_marbre.php index bcd3b34df04..8345d694cff 100644 --- a/htdocs/core/modules/commande/mod_commande_marbre.php +++ b/htdocs/core/modules/commande/mod_commande_marbre.php @@ -42,8 +42,18 @@ class mod_commande_marbre extends ModeleNumRefCommandes */ public $error=''; + /** + * @var string + * @deprecated + * @see name + */ public $nom='Marbre'; + /** + * @var string name + */ + public $name='Marbre'; + /** * Return description of numbering module diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index 6850fa2c57d..588d6fffc6d 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -44,7 +44,17 @@ class mod_commande_saphir extends ModeleNumRefCommandes */ public $error = ''; - public $nom = 'Saphir'; + /** + * @var string nom + * @deprecated + * @see name + */ + public $nom='Saphir'; + + /** + * @var string name + */ + public $name='Saphir'; /** diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php index ef6d100c2b6..4769ec17f99 100644 --- a/htdocs/core/modules/contract/mod_contract_magre.php +++ b/htdocs/core/modules/contract/mod_contract_magre.php @@ -40,7 +40,17 @@ class mod_contract_magre extends ModelNumRefContracts */ public $error = ''; - public $nom = 'Magre'; + /** + * @var string nom + * @deprecated + * @see name + */ + public $nom='Magre'; + + /** + * @var string name + */ + public $name='Magre'; public $code_auto=1; From b1fa12e1e393df4d476c5033c1bff97cbe4eb467 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 14:51:09 +0200 Subject: [PATCH 36/46] Standardize and update code --- .../core/modules/contract/mod_contract_olive.php | 14 +++++++++++++- .../core/modules/contract/mod_contract_serpis.php | 10 ++++++++++ .../modules/expedition/mod_expedition_ribera.php | 12 +++++++++++- .../modules/expedition/mod_expedition_safor.php | 10 ++++++++++ .../expensereport/mod_expensereport_jade.php | 10 ++++++++++ .../expensereport/mod_expensereport_sand.php | 12 +++++++++++- 6 files changed, 65 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/contract/mod_contract_olive.php b/htdocs/core/modules/contract/mod_contract_olive.php index 3602a0d3291..993f4bf9bfb 100644 --- a/htdocs/core/modules/contract/mod_contract_olive.php +++ b/htdocs/core/modules/contract/mod_contract_olive.php @@ -32,12 +32,24 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/contract/modules_contract.php'; */ class mod_contract_olive extends ModelNumRefContracts { + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Olive'; + /** + * @var string model name + */ + public $name='Olive'; - public $nom='Olive'; // Nom du modele public $code_modifiable = 1; // Code modifiable + public $code_modifiable_invalide = 1; // Code modifiable si il est invalide + public $code_modifiable_null = 1; // Code modifiables si il est null + public $code_null = 1; // Code facultatif /** diff --git a/htdocs/core/modules/contract/mod_contract_serpis.php b/htdocs/core/modules/contract/mod_contract_serpis.php index ea1064e7db6..e91775f669c 100644 --- a/htdocs/core/modules/contract/mod_contract_serpis.php +++ b/htdocs/core/modules/contract/mod_contract_serpis.php @@ -41,8 +41,18 @@ class mod_contract_serpis extends ModelNumRefContracts */ public $error=''; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ public $nom='Serpis'; + /** + * @var string model name + */ + public $name='Serpis'; + public $code_auto=1; diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php index 48f21d037eb..35a5eb2325b 100644 --- a/htdocs/core/modules/expedition/mod_expedition_ribera.php +++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php @@ -40,7 +40,17 @@ class mod_expedition_ribera extends ModelNumRefExpedition */ public $error = ''; - public $nom = 'Ribera'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Ribera'; + + /** + * @var string model name + */ + public $name='Ribera'; /** * Return default description of numbering model diff --git a/htdocs/core/modules/expedition/mod_expedition_safor.php b/htdocs/core/modules/expedition/mod_expedition_safor.php index a16d3a41d07..2ebf9335755 100644 --- a/htdocs/core/modules/expedition/mod_expedition_safor.php +++ b/htdocs/core/modules/expedition/mod_expedition_safor.php @@ -41,8 +41,18 @@ class mod_expedition_safor extends ModelNumRefExpedition */ public $error=''; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ public $nom='Safor'; + /** + * @var string model name + */ + public $name='Safor'; + /** * Return default description of numbering model diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index 2b32fc76152..385a7558c4c 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -41,8 +41,18 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport */ public $error=''; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ public $nom='Jade'; + /** + * @var string model name + */ + public $name='Jade'; + /** * Return description of numbering module diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index f3a818620b3..95cc3d39c95 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -41,7 +41,17 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport */ public $error = ''; - public $nom = 'Sand'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Sand'; + + /** + * @var string model name + */ + public $name='Sand'; /** From b7a4311802674027ba2776dcfb1ebd6a93a1c201 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 14:56:40 +0200 Subject: [PATCH 37/46] Standardize and update code --- htdocs/core/modules/export/export_csv.modules.php | 3 ++- htdocs/core/modules/export/export_excel.modules.php | 5 +++++ .../core/modules/export/export_excel2007.modules.php | 5 +++++ htdocs/core/modules/export/export_tsv.modules.php | 1 + htdocs/core/modules/export/modules_export.php | 10 ++++++---- htdocs/core/modules/fichinter/mod_arctic.php | 12 +++++++++++- htdocs/core/modules/fichinter/mod_pacific.php | 12 +++++++++++- 7 files changed, 41 insertions(+), 7 deletions(-) diff --git a/htdocs/core/modules/export/export_csv.modules.php b/htdocs/core/modules/export/export_csv.modules.php index e433d85d2ca..1efe6161647 100644 --- a/htdocs/core/modules/export/export_csv.modules.php +++ b/htdocs/core/modules/export/export_csv.modules.php @@ -49,6 +49,7 @@ class ExportCsv extends ModeleExports public $version = 'dolibarr'; public $label_lib; + public $version_lib; public $separator; @@ -63,7 +64,7 @@ class ExportCsv extends ModeleExports */ function __construct($db) { - global $conf,$langs; + global $conf, $langs; $this->db = $db; $this->separator=','; diff --git a/htdocs/core/modules/export/export_excel.modules.php b/htdocs/core/modules/export/export_excel.modules.php index 3711f5cfe54..1982fffb07e 100644 --- a/htdocs/core/modules/export/export_excel.modules.php +++ b/htdocs/core/modules/export/export_excel.modules.php @@ -51,12 +51,17 @@ class ExportExcel extends ModeleExports public $version = 'dolibarr'; public $label_lib; + public $version_lib; public $workbook; // Handle file + public $worksheet; // Handle sheet + public $row; + public $col; + public $file; // To save filename diff --git a/htdocs/core/modules/export/export_excel2007.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php index 71885c37297..6c80ac5977e 100644 --- a/htdocs/core/modules/export/export_excel2007.modules.php +++ b/htdocs/core/modules/export/export_excel2007.modules.php @@ -52,12 +52,17 @@ class ExportExcel2007 extends ExportExcel public $version = 'dolibarr'; public $label_lib; + public $version_lib; public $workbook; // Handle fichier + public $worksheet; // Handle onglet + public $row; + public $col; + public $file; // To save filename /** diff --git a/htdocs/core/modules/export/export_tsv.modules.php b/htdocs/core/modules/export/export_tsv.modules.php index b8e8f5d0763..8afa9ded884 100644 --- a/htdocs/core/modules/export/export_tsv.modules.php +++ b/htdocs/core/modules/export/export_tsv.modules.php @@ -50,6 +50,7 @@ class ExportTsv extends ModeleExports public $version = 'dolibarr'; public $label_lib; + public $version_lib; public $separator="\t"; diff --git a/htdocs/core/modules/export/modules_export.php b/htdocs/core/modules/export/modules_export.php index 6c155510f30..6436b501705 100644 --- a/htdocs/core/modules/export/modules_export.php +++ b/htdocs/core/modules/export/modules_export.php @@ -35,11 +35,13 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac */ public $error=''; - var $driverlabel=array(); - var $driverversion=array(); + public $driverlabel=array(); - var $liblabel=array(); - var $libversion=array(); + public $driverversion=array(); + + public $liblabel=array(); + + public $libversion=array(); // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index 0c986ef4ce6..82013e94413 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -43,7 +43,17 @@ class mod_arctic extends ModeleNumRefFicheinter */ public $error = ''; - public $nom = 'arctic'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='arctic'; + + /** + * @var string model name + */ + public $name='arctic'; /** diff --git a/htdocs/core/modules/fichinter/mod_pacific.php b/htdocs/core/modules/fichinter/mod_pacific.php index 67539837362..dcf6baf5ef6 100644 --- a/htdocs/core/modules/fichinter/mod_pacific.php +++ b/htdocs/core/modules/fichinter/mod_pacific.php @@ -43,7 +43,17 @@ class mod_pacific extends ModeleNumRefFicheinter */ public $error=''; - public $nom = 'pacific'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='pacific'; + + /** + * @var string model name + */ + public $name='pacific'; /** From 7eda9c846c2e866447f1bf8fa9130fedd25027e5 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 15:01:03 +0200 Subject: [PATCH 38/46] Standardize and update code --- .../core/modules/holiday/mod_holiday_immaculate.php | 12 +++++++++++- htdocs/core/modules/holiday/mod_holiday_madonna.php | 10 ++++++++++ htdocs/core/modules/import/import_csv.modules.php | 8 ++++++-- htdocs/core/modules/import/import_xlsx.modules.php | 5 +++++ htdocs/core/modules/import/modules_import.php | 9 ++++++++- 5 files changed, 40 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php index 9f74e6d1419..b63326ca276 100644 --- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php +++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php @@ -41,7 +41,17 @@ class mod_holiday_immaculate extends ModelNumRefHolidays */ public $error = ''; - public $nom = 'Immaculate'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Immaculate'; + + /** + * @var string model name + */ + public $name='Immaculate'; public $code_auto=1; diff --git a/htdocs/core/modules/holiday/mod_holiday_madonna.php b/htdocs/core/modules/holiday/mod_holiday_madonna.php index eaafade561f..98380d9fae5 100644 --- a/htdocs/core/modules/holiday/mod_holiday_madonna.php +++ b/htdocs/core/modules/holiday/mod_holiday_madonna.php @@ -42,8 +42,18 @@ class mod_holiday_madonna extends ModelNumRefHolidays */ public $error=''; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ public $nom='Madonna'; + /** + * @var string model name + */ + public $name='Madonna'; + public $code_auto=1; diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 03f727e8759..60dc9bf6c15 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -38,7 +38,7 @@ class ImportCsv extends ModeleImports */ public $db; - var $datatoimport; + public $datatoimport; /** * @var string Error code (or message) @@ -69,17 +69,21 @@ class ImportCsv extends ModeleImports public $version = 'dolibarr'; public $label_lib; // Label of external lib used by driver + public $version_lib; // Version of external lib used by driver public $separator; public $file; // Path of file + public $handle; // Handle fichier public $cacheconvert=array(); // Array to cache list of value found after a convertion + public $cachefieldtable=array(); // Array to cache list of value found into fields@tables public $nbinsert = 0; // # of insert done during the import + public $nbupdate = 0; // # of update done during the import @@ -91,7 +95,7 @@ class ImportCsv extends ModeleImports */ function __construct($db,$datatoimport) { - global $conf,$langs; + global $conf, $langs; $this->db = $db; $this->separator=(GETPOST('separator')?GETPOST('separator'):(empty($conf->global->IMPORT_CSV_SEPARATOR_TO_USE)?',':$conf->global->IMPORT_CSV_SEPARATOR_TO_USE)); diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index e79ef688782..36b57e2d69a 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -69,18 +69,23 @@ class ImportXlsx extends ModeleImports public $version = 'dolibarr'; public $label_lib; // Label of external lib used by driver + public $version_lib; // Version of external lib used by driver public $separator; public $file; // Path of file + public $handle; // Handle fichier public $cacheconvert=array(); // Array to cache list of value found after a convertion + public $cachefieldtable=array(); // Array to cache list of value found into fields@tables public $workbook; // temporary import file + public $record; // current record + public $headers; diff --git a/htdocs/core/modules/import/modules_import.php b/htdocs/core/modules/import/modules_import.php index b69ea8dcf7c..214c04ad857 100644 --- a/htdocs/core/modules/import/modules_import.php +++ b/htdocs/core/modules/import/modules_import.php @@ -37,7 +37,10 @@ class ModeleImports public $datatoimport; - public $error=''; + /** + * @var string Error code (or message) + */ + public $error=''; /** * @var int id of driver @@ -58,14 +61,18 @@ class ModeleImports public $version = 'dolibarr'; public $label_lib; // Label of external lib used by driver + public $version_lib; // Version of external lib used by driver // Array of all drivers public $driverlabel=array(); + public $driverdesc=array(); + public $driverversion=array(); public $liblabel=array(); + public $libversion=array(); From 92a484dcd9324c26197054b750e44aaa5b6d96bc Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 15:07:43 +0200 Subject: [PATCH 39/46] Standardize and update code --- .../core/modules/livraison/mod_livraison_jade.php | 12 +++++++++++- .../modules/livraison/mod_livraison_saphir.php | 14 ++++++++++++-- htdocs/core/modules/payment/mod_payment_ant.php | 12 +++++++++++- htdocs/core/modules/payment/mod_payment_cicada.php | 10 ++++++++++ .../modules/product/mod_codeproduct_elephant.php | 12 ++++++++++-- .../modules/product/mod_codeproduct_leopard.php | 12 ++++++++++-- 6 files changed, 64 insertions(+), 8 deletions(-) diff --git a/htdocs/core/modules/livraison/mod_livraison_jade.php b/htdocs/core/modules/livraison/mod_livraison_jade.php index eed356336b0..1fd598d02a7 100644 --- a/htdocs/core/modules/livraison/mod_livraison_jade.php +++ b/htdocs/core/modules/livraison/mod_livraison_jade.php @@ -45,7 +45,17 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder */ public $error = ''; - public $nom = "Jade"; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Jade'; + + /** + * @var string model name + */ + public $name='Jade'; public $prefix='BL'; diff --git a/htdocs/core/modules/livraison/mod_livraison_saphir.php b/htdocs/core/modules/livraison/mod_livraison_saphir.php index 1a07341c520..cbe105ef75c 100644 --- a/htdocs/core/modules/livraison/mod_livraison_saphir.php +++ b/htdocs/core/modules/livraison/mod_livraison_saphir.php @@ -42,7 +42,17 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder */ public $error = ''; - public $nom = 'Saphir'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Saphir'; + + /** + * @var string model name + */ + public $name='Saphir'; /** @@ -52,7 +62,7 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder */ function info() { - global $conf,$langs; + global $conf, $langs; $langs->load("bills"); diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index cc66b39e4f4..b7d88464355 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -41,7 +41,17 @@ class mod_payment_ant extends ModeleNumRefPayments */ public $error = ''; - public $nom = 'Ant'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Ant'; + + /** + * @var string model name + */ + public $name='Ant'; /** diff --git a/htdocs/core/modules/payment/mod_payment_cicada.php b/htdocs/core/modules/payment/mod_payment_cicada.php index 1fce35f93cb..5869032cc5b 100644 --- a/htdocs/core/modules/payment/mod_payment_cicada.php +++ b/htdocs/core/modules/payment/mod_payment_cicada.php @@ -42,8 +42,18 @@ class mod_payment_cicada extends ModeleNumRefPayments */ public $error=''; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ public $nom='Cicada'; + /** + * @var string model name + */ + public $name='Cicada'; + /** * Return description of numbering module diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index 8910805b3cb..f051fab7f8e 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -34,9 +34,17 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/product/modules_product.class.php' */ class mod_codeproduct_elephant extends ModeleProductCode { - public $nom='Elephant'; // Nom du modele + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Elephant'; - public $name='Elephant'; // Nom du modele + /** + * @var string model name + */ + public $name='Elephant'; public $code_modifiable; // Code modifiable diff --git a/htdocs/core/modules/product/mod_codeproduct_leopard.php b/htdocs/core/modules/product/mod_codeproduct_leopard.php index de9d281c92f..815e383d900 100644 --- a/htdocs/core/modules/product/mod_codeproduct_leopard.php +++ b/htdocs/core/modules/product/mod_codeproduct_leopard.php @@ -39,9 +39,17 @@ class mod_codeproduct_leopard extends ModeleProductCode * Le fonctionnement de celui-ci doit donc rester le plus ouvert possible */ - public $nom='Leopard'; // Nom du modele + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Leopard'; - public $name='Leopard'; // Nom du modele + /** + * @var string model name + */ + public $name='Leopard'; public $code_modifiable; // Code modifiable From 2adfdab77138c0427b064cdcb9026d1c2ae08784 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 15:14:59 +0200 Subject: [PATCH 40/46] Standardize and update code --- htdocs/core/modules/project/mod_project_simple.php | 12 ++++++++++-- .../core/modules/project/mod_project_universal.php | 12 ++++++++++-- htdocs/core/modules/propale/mod_propale_marbre.php | 12 +++++++++++- htdocs/core/modules/propale/mod_propale_saphir.php | 12 +++++++++++- .../core/modules/societe/mod_codeclient_elephant.php | 12 ++++++++++-- .../core/modules/societe/mod_codeclient_leopard.php | 12 ++++++++++-- .../core/modules/societe/mod_codeclient_monkey.php | 12 ++++++++++-- .../core/modules/societe/mod_codecompta_aquarium.php | 8 ++++++++ .../core/modules/societe/mod_codecompta_panicum.php | 8 ++++++++ 9 files changed, 88 insertions(+), 12 deletions(-) diff --git a/htdocs/core/modules/project/mod_project_simple.php b/htdocs/core/modules/project/mod_project_simple.php index 8fef9abd7bd..94f2db957a3 100644 --- a/htdocs/core/modules/project/mod_project_simple.php +++ b/htdocs/core/modules/project/mod_project_simple.php @@ -44,9 +44,17 @@ class mod_project_simple extends ModeleNumRefProjects */ public $error=''; - public $nom = "Simple"; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Simple'; - public $name = "Simple"; + /** + * @var string model name + */ + public $name='Simple'; /** diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index f9ce0b38c62..0d11ac820c0 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -41,9 +41,17 @@ class mod_project_universal extends ModeleNumRefProjects */ public $error = ''; - public $nom = 'Universal'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Universal'; - public $name = 'Universal'; + /** + * @var string model name + */ + public $name='Universal'; /** diff --git a/htdocs/core/modules/propale/mod_propale_marbre.php b/htdocs/core/modules/propale/mod_propale_marbre.php index d6ff9a831b8..427d4596636 100644 --- a/htdocs/core/modules/propale/mod_propale_marbre.php +++ b/htdocs/core/modules/propale/mod_propale_marbre.php @@ -44,7 +44,17 @@ class mod_propale_marbre extends ModeleNumRefPropales */ public $error=''; - public $nom = "Marbre"; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Marbre'; + + /** + * @var string model name + */ + public $name='Marbre'; /** diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index fab4d2b86e7..913743eb93d 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -44,7 +44,17 @@ class mod_propale_saphir extends ModeleNumRefPropales */ public $error = ''; - public $nom = 'Saphir'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Saphir'; + + /** + * @var string model name + */ + public $name='Saphir'; /** diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index 312526e93a1..621bbd08d3e 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -34,9 +34,17 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php' */ class mod_codeclient_elephant extends ModeleThirdPartyCode { - public $nom='Elephant'; // Nom du modele + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Elephant'; - public $name='Elephant'; // Nom du modele + /** + * @var string model name + */ + public $name='Elephant'; public $code_modifiable; // Code modifiable diff --git a/htdocs/core/modules/societe/mod_codeclient_leopard.php b/htdocs/core/modules/societe/mod_codeclient_leopard.php index b9f214c0623..9bdd27d5bee 100644 --- a/htdocs/core/modules/societe/mod_codeclient_leopard.php +++ b/htdocs/core/modules/societe/mod_codeclient_leopard.php @@ -38,9 +38,17 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode * Le fonctionnement de celui-ci doit donc rester le plus ouvert possible */ - public $nom='Leopard'; // Nom du modele + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Leopard'; - public $name='Leopard'; // Nom du modele + /** + * @var string model name + */ + public $name='Leopard'; public $code_modifiable; // Code modifiable diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index 639aff8bc53..d914f6953ae 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -32,9 +32,17 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php' */ class mod_codeclient_monkey extends ModeleThirdPartyCode { - public $nom='Monkey'; // Nom du modele + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Monkey'; - public $name='Monkey'; // Nom du modele + /** + * @var string model name + */ + public $name='Monkey'; public $code_modifiable; // Code modifiable diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php index ff759cc5cc2..772b28f3d6c 100644 --- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php +++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php @@ -31,8 +31,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php' */ class mod_codecompta_aquarium extends ModeleAccountancyCode { + /** + * @var string Nom du modele + * @deprecated + * @see name + */ public $nom='Aquarium'; + /** + * @var string model name + */ public $name='Aquarium'; /** diff --git a/htdocs/core/modules/societe/mod_codecompta_panicum.php b/htdocs/core/modules/societe/mod_codecompta_panicum.php index 3919539d8d0..c1e83b75db4 100644 --- a/htdocs/core/modules/societe/mod_codecompta_panicum.php +++ b/htdocs/core/modules/societe/mod_codecompta_panicum.php @@ -30,8 +30,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php' */ class mod_codecompta_panicum extends ModeleAccountancyCode { + /** + * @var string Nom du modele + * @deprecated + * @see name + */ public $nom='Panicum'; + /** + * @var string model name + */ public $name='Panicum'; /** From 8225e039d9d529ddd088cc3b5ab9caa749f2faf1 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 16:58:34 +0200 Subject: [PATCH 41/46] Standardize and update code --- .../mod_facture_fournisseur_cactus.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php index 618079160b7..28474f094f1 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php @@ -44,7 +44,17 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices */ public $error = ''; - public $nom = 'Cactus'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Cactus'; + + /** + * @var string model name + */ + public $name='Cactus'; public $prefixinvoice='SI'; From e64fbd952241739cd05e6d91cbcfd189543c3bdc Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 17:02:32 +0200 Subject: [PATCH 42/46] Standardize and update code --- .../mod_facture_fournisseur_tulip.php | 12 +++++++++++- .../mod_commande_fournisseur_muguet.php | 12 +++++++++++- .../mod_commande_fournisseur_orchidee.php | 12 +++++++++++- .../mod_supplier_payment_brodator.php | 12 +++++++++++- .../supplier_payment/mod_supplier_payment_bronan.php | 10 ++++++++++ 5 files changed, 54 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index 28c18c96e2f..6079006d315 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -47,7 +47,17 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices */ public $error = ''; - public $nom = 'Tulip'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Tulip'; + + /** + * @var string model name + */ + public $name='Tulip'; /** diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php index e981ce35a2e..8448c61f62b 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php @@ -42,7 +42,17 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders */ public $error = ''; - public $nom = 'Muguet'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Muguet'; + + /** + * @var string model name + */ + public $name='Muguet'; public $prefix='CF'; diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index 1b265541789..1645ce796b2 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -43,7 +43,17 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders */ public $error = ''; - public $nom = 'Orchidee'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Orchidee'; + + /** + * @var string model name + */ + public $name='Orchidee'; /** diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index 594fbad1ec6..216bc4bde90 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -41,7 +41,17 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments */ public $error = ''; - public $nom = 'Brodator'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Brodator'; + + /** + * @var string model name + */ + public $name='Brodator'; /** diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php index d517e8fb55e..0d64991065a 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php @@ -42,8 +42,18 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments */ public $error=''; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ public $nom='Bronan'; + /** + * @var string model name + */ + public $name='Bronan'; + /** * Return description of numbering module From 85ff212498e04715298ddcaa948cf932d10864e5 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 17:11:29 +0200 Subject: [PATCH 43/46] Standardize and update code --- .../mod_supplier_proposal_marbre.php | 12 +++++++++++- .../mod_supplier_proposal_saphir.php | 12 +++++++++++- htdocs/core/modules/ticket/mod_ticket_simple.php | 16 ++++++++++++---- .../core/modules/ticket/mod_ticket_universal.php | 12 ++++++++++-- 4 files changed, 44 insertions(+), 8 deletions(-) diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php index 502b66e17f0..e7fb65f7612 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php @@ -44,7 +44,17 @@ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal */ public $error=''; - public $nom = "Marbre"; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Marbre'; + + /** + * @var string model name + */ + public $name='Marbre'; /** diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index 0968fe10e11..4827acdc9c8 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -44,7 +44,17 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal */ public $error = ''; - public $nom = 'Saphir'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Saphir'; + + /** + * @var string model name + */ + public $name='Saphir'; /** diff --git a/htdocs/core/modules/ticket/mod_ticket_simple.php b/htdocs/core/modules/ticket/mod_ticket_simple.php index 68b62e8afcb..c744453a899 100644 --- a/htdocs/core/modules/ticket/mod_ticket_simple.php +++ b/htdocs/core/modules/ticket/mod_ticket_simple.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010 Laurent Destailleur +/* Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2010 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -43,9 +43,17 @@ class mod_ticket_simple extends ModeleNumRefTicket */ public $error = ''; - public $nom = "Simple"; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Simple'; - public $name = "Simple"; + /** + * @var string model name + */ + public $name='Simple'; /** * Return description of numbering module diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index ece0959d050..adca6897ac3 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -40,9 +40,17 @@ class mod_ticket_universal extends ModeleNumRefTicket */ public $error = ''; - public $nom = 'Universal'; + /** + * @var string Nom du modele + * @deprecated + * @see name + */ + public $nom='Universal'; - public $name = 'Universal'; + /** + * @var string model name + */ + public $name='Universal'; /** * Renvoi la description du modele de numerotation From e1a03c49cf7f834257e53e3f633c3ead2be80e00 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 17:19:42 +0200 Subject: [PATCH 44/46] Standardize and update code --- htdocs/core/class/cstate.class.php | 14 +++++++++++++- .../core/modules/project/task/mod_task_simple.php | 12 ++++++++++-- .../modules/project/task/mod_task_universal.php | 12 ++++++++++-- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/cstate.class.php b/htdocs/core/class/cstate.class.php index 13c02ed777a..4320446d7b5 100644 --- a/htdocs/core/class/cstate.class.php +++ b/htdocs/core/class/cstate.class.php @@ -56,7 +56,19 @@ class Cstate // extends CommonObject public $id; public $code_departement; - public $nom; + + /** + * @var string + * @deprecated + * @see name + */ + public $nom=''; + + /** + * @var string name + */ + public $name=''; + public $active; diff --git a/htdocs/core/modules/project/task/mod_task_simple.php b/htdocs/core/modules/project/task/mod_task_simple.php index 009449e36c4..48e9cfe557e 100644 --- a/htdocs/core/modules/project/task/mod_task_simple.php +++ b/htdocs/core/modules/project/task/mod_task_simple.php @@ -44,9 +44,17 @@ class mod_task_simple extends ModeleNumRefTask */ public $error=''; - public $nom = "Simple"; + /** + * @var string + * @deprecated + * @see name + */ + public $nom='Simple'; - public $name = "Simple"; + /** + * @var string name + */ + public $name='Simple'; /** diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index 4ffb0424d8a..6f46f914b07 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -41,9 +41,17 @@ class mod_task_universal extends ModeleNumRefTask */ public $error = ''; - public $nom = 'Universal'; + /** + * @var string + * @deprecated + * @see name + */ + public $nom='Universal'; - public $name = 'Universal'; + /** + * @var string name + */ + public $name='Universal'; /** From 9c9f5bd3c3c76c2b3a31d2253fcee5a175e3093b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 17:26:39 +0200 Subject: [PATCH 45/46] Standardize and update code --- htdocs/societe/class/societe.class.php | 5 +++++ htdocs/user/class/usergroup.class.php | 29 ++++++++++++++++++-------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 70d4e4801c2..f2b80b586c6 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -107,6 +107,11 @@ class Societe extends CommonObject */ public $nom; + /** + * @var string name + */ + public $name; + /** * Alias names (commercial, trademark or alias names) * @var string diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 78ef5b7a390..e3ada6efcac 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -1,11 +1,11 @@ - * Copyright (c) 2005-2018 Laurent Destailleur - * Copyright (c) 2005-2018 Regis Houssin - * Copyright (C) 2012 Florian Henry - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2014 Alexis Algoud - * Copyright (C) 2018 Nicolas ZABOURI +/* Copyright (c) 2005 Rodolphe Quiedeville + * Copyright (c) 2005-2018 Laurent Destailleur + * Copyright (c) 2005-2018 Regis Houssin + * Copyright (C) 2012 Florian Henry + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2014 Alexis Algoud + * Copyright (C) 2018 Nicolas ZABOURI * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,6 +46,7 @@ class UserGroup extends CommonObject public $table_element='usergroup'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + public $picto='group'; /** @@ -53,16 +54,26 @@ class UserGroup extends CommonObject */ public $entity; - public $name; // Name of group /** + * @var string * @deprecated * @see name */ - public $nom; // Name of group + public $nom; + + /** + * @var string name + */ + public $name; // Name of group + public $globalgroup; // Global group + public $datec; // Creation date of group + public $datem; // Modification date of group + public $note; // Description + public $members=array(); // Array of users public $nb_rights; // Number of rights granted to the user From 67bbead7c1a9e8421b71e8ecc145533a026d29e4 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 17:46:39 +0200 Subject: [PATCH 46/46] Standardize and update code --- htdocs/core/class/CMailFile.class.php | 6 +++++- htdocs/core/class/CSMSFile.class.php | 19 +++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 8fd6e48d8a3..d1a46e4d0b9 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -59,7 +59,11 @@ class CMailFile var $eol; var $eol2; - var $error=''; + + /** + * @var string Error code (or message) + */ + public $error=''; var $smtps; // Contains SMTPs object (if this method is used) var $phpmailer; // Contains PHPMailer object (if this method is used) diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php index c2512af70ef..b6c334f7e1c 100644 --- a/htdocs/core/class/CSMSFile.class.php +++ b/htdocs/core/class/CSMSFile.class.php @@ -34,15 +34,18 @@ */ class CSMSFile { - var $error=''; + /** + * @var string Error code (or message) + */ + public $error=''; - var $addr_from; - var $addr_to; - var $deferred; - var $priority; - var $class; - var $message; - var $nostop; + public $addr_from; + public $addr_to; + public $deferred; + public $priority; + public $class; + public $message; + public $nostop; /**