From 80b7229174f92d8c9fe99db92b8bbbae7b40e705 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 23 Aug 2018 11:34:55 +0200 Subject: [PATCH] Standardize and update code --- htdocs/accountancy/class/accountancycategory.class.php | 7 ++++++- htdocs/core/class/discount.class.php | 5 ++++- htdocs/core/class/html.formfile.class.php | 4 ++++ htdocs/core/class/html.formother.class.php | 6 +++++- htdocs/core/class/html.formticket.class.php | 5 ++++- htdocs/core/class/html.formwebsite.class.php | 6 +++++- htdocs/core/class/menubase.class.php | 6 +++++- htdocs/ecm/class/ecmdirectory.class.php | 4 ++++ htdocs/fourn/class/fournisseur.commande.dispatch.class.php | 6 +++++- htdocs/ticket/class/actions_ticket.class.php | 7 ++++++- htdocs/ticket/class/ticketlogs.class.php | 6 +++++- 11 files changed, 53 insertions(+), 9 deletions(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 4cb11b78d44..6bbe6e08dfb 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -35,7 +35,12 @@ class AccountancyCategory // extends CommonObject */ public $db; - public $error; //!< To return error code (or message) + /** + * @var string Error string + * @see errors + */ + public $error; + public $errors=array(); //!< To return several error codes (or messages) public $element='c_accounting_category'; //!< Id that identify managed objects diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index aa6c6eb9b5c..b3cfb73654b 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -33,7 +33,10 @@ class DiscountAbsolute */ public $db; - public $error; + /** + * @var string Error code (or message) + */ + public $error; public $id; // Id discount public $fk_soc; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 117ec484c15..15e22944d83 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -36,7 +36,11 @@ class FormFile { private $db; + /** + * @var string Error code (or message) + */ public $error; + public $numoffiles; public $infofiles; // Used to return informations by function getDocumentsLink diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 69fe03ecaa1..6982a8a6971 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -38,7 +38,11 @@ class FormOther { private $db; - public $error; + + /** + * @var string Error code (or message) + */ + public $error; /** diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 5da6f4fe439..c0f4a3f75d2 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -83,7 +83,10 @@ class FormTicket public $substit = array(); public $param = array(); - public $error; + /** + * @var string Error code (or message) + */ + public $error; /** diff --git a/htdocs/core/class/html.formwebsite.class.php b/htdocs/core/class/html.formwebsite.class.php index fc863c4d069..5b883835fd3 100644 --- a/htdocs/core/class/html.formwebsite.class.php +++ b/htdocs/core/class/html.formwebsite.class.php @@ -28,7 +28,11 @@ class FormWebsite { private $db; - public $error; + + /** + * @var string Error code (or message) + */ + public $error; /** diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index e0ea1d57378..64589e0db65 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -33,7 +33,11 @@ class Menubase */ public $db; - public $error; // To return error code (or message) + /** + * @var string Error code (or message) + */ + public $error; + public $errors=array(); // To return several error codes (or messages) public $id; diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 4eb31ee134b..cdaaa67b794 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -63,7 +63,11 @@ class EcmDirectory // extends CommonObject public $full_arbo_loaded; + /** + * @var string Error code (or message) + */ public $error; + public $errors; diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index d957d0969cd..1f6929614aa 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -39,7 +39,11 @@ class CommandeFournisseurDispatch extends CommonObject */ public $db; - public $error; //!< To return error code (or message) + /** + * @var string Error code (or message) + */ + public $error; + public $errors=array(); //!< To return several error codes (or messages) public $element='commandefournisseurdispatch'; //!< Id that identify managed objects diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 27dbf9ff942..b4aaf17e9d8 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -43,7 +43,12 @@ class ActionsTicket public $dao; public $mesg; - public $error; + + /** + * @var string Error code (or message) + */ + public $error; + public $errors = array(); //! Numero de l'erreur public $errno = 0; diff --git a/htdocs/ticket/class/ticketlogs.class.php b/htdocs/ticket/class/ticketlogs.class.php index 448d3cc7c41..fd996d4e3c4 100644 --- a/htdocs/ticket/class/ticketlogs.class.php +++ b/htdocs/ticket/class/ticketlogs.class.php @@ -37,7 +37,11 @@ class Ticketlogs// extends CommonObject */ public $db; - public $error; //!< To return error code (or message) + /** + * @var string Error code (or message) + */ + public $error; + public $errors = array(); //!< To return several error codes (or messages) public $element = 'ticketlogs'; //!< Id that identify managed objects