From 11d75573be67ef555f9806028c3c23e98835da67 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 5 Sep 2018 12:21:13 +0200 Subject: [PATCH] Standardize and update code --- htdocs/contact/class/contact.class.php | 10 +++-- htdocs/contrat/class/contrat.class.php | 5 ++- .../interface_20_all_Logevents.class.php | 4 ++ ...e_20_modWorkflow_WorkflowManager.class.php | 4 ++ ...terface_50_modAgenda_ActionsAuto.class.php | 4 ++ ..._modBlockedlog_ActionsBlockedLog.class.php | 4 ++ ...interface_50_modLdap_Ldapsynchro.class.php | 4 ++ ...odMailmanspip_Mailmanspipsynchro.class.php | 4 ++ ..._50_modNotification_Notification.class.php | 6 ++- htdocs/cron/class/cronjob.class.php | 5 ++- htdocs/don/class/don.class.php | 6 ++- htdocs/don/class/paymentdonation.class.php | 5 ++- htdocs/ecm/class/ecmdirectory.class.php | 3 ++ htdocs/ecm/class/ecmfiles.class.php | 3 ++ htdocs/expedition/class/expedition.class.php | 4 ++ .../class/paymentexpensereport.class.php | 37 ++++++++++--------- htdocs/fichinter/class/fichinter.class.php | 3 ++ 17 files changed, 86 insertions(+), 25 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 4cd6fe8182038..ddb9acfe39fdd 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -41,13 +41,17 @@ class Contact extends CommonObject * @var string ID to identify managed object */ public $element='contact'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='socpeople'; - + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'contact'; @@ -726,7 +730,7 @@ function fetch($id, $user=0, $ref_ext='') $this->date_creation = $this->db->jdate($obj->date_creation); $this->date_modification = $this->db->jdate($obj->date_modification); - + $this->fk_departement = $obj->fk_departement; // deprecated $this->state_id = $obj->fk_departement; $this->departement_code = $obj->state_code; // deprecated diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 053d51905df14..c64402777e708 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -61,7 +61,10 @@ class Contrat extends CommonObject */ public $fk_element='fk_contrat'; - public $picto='contract'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto='contract'; /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/core/triggers/interface_20_all_Logevents.class.php b/htdocs/core/triggers/interface_20_all_Logevents.class.php index c08df837eb21b..a8de26e713b01 100644 --- a/htdocs/core/triggers/interface_20_all_Logevents.class.php +++ b/htdocs/core/triggers/interface_20_all_Logevents.class.php @@ -31,7 +31,11 @@ */ class InterfaceLogevents extends DolibarrTriggers { + /** + * @var string Image of the trigger + */ public $picto = 'technic'; + public $family = 'core'; public $description = "Triggers of this module allows to add security event records inside Dolibarr."; 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 4bd95caeb5878..a719ef0b4fca3 100644 --- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php +++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php @@ -32,7 +32,11 @@ class InterfaceWorkflowManager extends DolibarrTriggers { + /** + * @var string Image of the trigger + */ public $picto = 'technic'; + public $family = 'core'; public $description = "Triggers of this module allows to manage workflows"; 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 0c509a1d5b3d4..6994aa6f3e673 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -37,6 +37,10 @@ class InterfaceActionsAuto extends DolibarrTriggers public $family = 'agenda'; public $description = "Triggers of this module add actions in agenda according to setup made in agenda setup."; public $version = self::VERSION_DOLIBARR; + + /** + * @var string Image of the trigger + */ public $picto = 'action'; /** diff --git a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php index a4ac9361a2926..82e6b9e56eb21 100644 --- a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php +++ b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php @@ -33,6 +33,10 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers public $family = 'system'; public $description = "Triggers of this module add action for BlockedLog module."; public $version = self::VERSION_DOLIBARR; + + /** + * @var string Image of the trigger + */ public $picto = 'technic'; /** diff --git a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php index 9ed11f41b975f..376ed47c4868c 100644 --- a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php +++ b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php @@ -34,6 +34,10 @@ class InterfaceLdapsynchro extends DolibarrTriggers public $family = 'ldap'; public $description = "Triggers of this module allows to synchronize Dolibarr toward a LDAP database."; public $version = self::VERSION_DOLIBARR; + + /** + * @var string Image of the trigger + */ public $picto = 'technic'; /** diff --git a/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php b/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php index ea3ae2c67aa4f..e551086f9e83b 100644 --- a/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php +++ b/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php @@ -32,6 +32,10 @@ class InterfaceMailmanSpipsynchro extends DolibarrTriggers public $family = 'mailmanspip'; public $description = "Triggers of this module allows to synchronize Mailman an Spip."; public $version = self::VERSION_DOLIBARR; + + /** + * @var string Image of the trigger + */ public $picto = 'technic'; /** diff --git a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php index 8b4351499ce60..0daf141a20849 100644 --- a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php +++ b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php @@ -33,9 +33,13 @@ class InterfaceNotification extends DolibarrTriggers public $family = 'notification'; public $description = "Triggers of this module send email notifications according to Notification module setup."; public $version = self::VERSION_DOLIBARR; + + /** + * @var string Image of the trigger + */ public $picto = 'email'; - var $listofmanagedevents=array( + public $listofmanagedevents=array( 'BILL_VALIDATE', 'BILL_PAYED', 'ORDER_VALIDATE', diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index e18d918d56a32..e1c49809f7cf8 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -40,7 +40,10 @@ class Cronjob extends CommonObject */ public $table_element='cronjob'; - public $picto = 'cron'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'cron'; /** * @var int Entity diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 8c4fca9d00829..1ed604b56f29b 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -50,7 +50,11 @@ class Don extends CommonObject public $fk_element = 'fk_donation'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - public $picto = 'generic'; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'generic'; public $date; public $amount; diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index e85cb410cd56f..c5a32cc3fd6a1 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -39,7 +39,10 @@ class PaymentDonation extends CommonObject */ public $table_element='payment_donation'; - public $picto = 'payment'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'payment'; /** * @var int ID diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 97885bf2430bf..a5cc091a3361e 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -37,6 +37,9 @@ class EcmDirectory // extends CommonObject */ //public $table_element='ecm_directories'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'dir'; /** diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index cf2d58c7ee5b7..2e441254acde5 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -46,6 +46,9 @@ class EcmFiles extends CommonObject */ public $table_element = 'ecm_files'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'generic'; /** diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 4c33782582226..bd8f5901d36a6 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -62,6 +62,10 @@ class Expedition extends CommonObject public $table_element_line="expeditiondet"; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'sending'; public $socid; diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index 0dceeae4808d1..522177c64b2d3 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -40,24 +40,27 @@ class PaymentExpenseReport extends CommonObject */ public $table_element='payment_expensereport'; - public $picto = 'payment'; - - var $rowid; - - var $fk_expensereport; - var $datec=''; - var $tms=''; - var $datep=''; - var $amount; // Total amount of payment - var $amounts=array(); // Array of amounts - var $fk_typepayment; - var $num_payment; - var $fk_bank; - var $fk_user_creat; - var $fk_user_modif; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'payment'; + + public $rowid; + + public $fk_expensereport; + public $datec=''; + public $tms=''; + public $datep=''; + public $amount; // Total amount of payment + public $amounts=array(); // Array of amounts + public $fk_typepayment; + public $num_payment; + public $fk_bank; + public $fk_user_creat; + public $fk_user_modif; //Unknow field - var $chid; - var $total; + public $chid; + public $total; /** * Constructor diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index bce5f81c33928..3029306d1f26c 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -55,6 +55,9 @@ class Fichinter extends CommonObject */ public $table_element_line='fichinterdet'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'intervention'; /**