From 38ca6096b2ce23bdcc5aa299ba57449f4ea079ff Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 5 Sep 2018 10:31:12 +0200 Subject: [PATCH 01/20] Standardize and update code --- htdocs/commande/class/commande.class.php | 3 ++ htdocs/compta/bank/class/account.class.php | 6 +++ htdocs/compta/bank/class/bankcateg.class.php | 5 ++- .../bank/class/paymentvarious.class.php | 3 ++ .../facture/class/facture-rec.class.php | 3 ++ htdocs/compta/facture/class/facture.class.php | 3 ++ .../compta/localtax/class/localtax.class.php | 19 +++++---- .../cheque/class/remisecheque.class.php | 9 +++-- .../compta/paiement/class/paiement.class.php | 40 +++++++++++-------- .../class/bonprelevement.class.php | 39 +++++++++--------- .../salaries/class/paymentsalary.class.php | 3 ++ .../sociales/class/chargesociales.class.php | 35 ++++++++-------- .../class/paymentsocialcontribution.class.php | 5 +++ htdocs/compta/tva/class/tva.class.php | 21 +++++----- 14 files changed, 122 insertions(+), 72 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 6dc3bdc639d..6f525837648 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -64,6 +64,9 @@ class Commande extends CommonOrder */ public $fk_element = 'fk_commande'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'order'; /** diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 7681434bdfe..e66d6f73731 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -46,6 +46,9 @@ class Account extends CommonObject */ public $table_element = 'bank_account'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'account'; /** @@ -1664,6 +1667,9 @@ class AccountLine extends CommonObject */ public $table_element='bank'; + /** + * @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/compta/bank/class/bankcateg.class.php b/htdocs/compta/bank/class/bankcateg.class.php index 10bcd9a07c4..cc291c6be64 100644 --- a/htdocs/compta/bank/class/bankcateg.class.php +++ b/htdocs/compta/bank/class/bankcateg.class.php @@ -30,7 +30,10 @@ class BankCateg // extends CommonObject { //public $element='bank_categ'; //!< Id that identify managed objects //public $table_element='bank_categ'; //!< Name of table without prefix where object is stored - 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'; /** * @var int ID diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 3a6fe74ab37..f5271e40694 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -40,6 +40,9 @@ class PaymentVarious extends CommonObject */ public $table_element='payment_various'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'bill'; /** diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 012dac4a274..95fa81c9e7e 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -59,6 +59,9 @@ class FactureRec extends CommonInvoice */ public $fk_element='fk_facture'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='bill'; public $entity; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 498118c30fc..984e206ea66 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -73,6 +73,9 @@ class Facture extends CommonInvoice */ public $fk_element = 'fk_facture'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='bill'; /** diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 2b53770183d..45efdf69c83 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -39,22 +39,25 @@ class Localtax extends CommonObject */ public $table_element='localtax'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='payment'; - var $ltt; - var $tms; - var $datep; - var $datev; - var $amount; + public $ltt; + public $tms; + public $datep; + public $datev; + public $amount; /** * @var string local tax */ public $label; - var $fk_bank; - var $fk_user_creat; - var $fk_user_modif; + public $fk_bank; + public $fk_user_creat; + public $fk_user_modif; /** * Constructor diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index b28ca9dcb18..719c8cdcac8 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -43,12 +43,15 @@ class RemiseCheque extends CommonObject */ public $table_element='bordereau_cheque'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'payment'; - var $num; - var $intitule; + public $num; + public $intitule; //! Numero d'erreur Plage 1024-1279 - var $errno; + public $errno; public $amount; public $date_bordereau; diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 1fd2ad8bbef..4e536e7ba6b 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -40,40 +40,46 @@ class Paiement extends CommonObject * @var string ID to identify managed object */ public $element='payment'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='paiement'; - - public $picto = 'payment'; - var $facid; - var $datepaye; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'payment'; + + public $facid; + public $datepaye; + /** * @deprecated * @see amount, amounts */ - var $total; + public $total; + /** * @deprecated * @see amount, amounts */ - var $montant; - var $amount; // Total amount of payment - var $amounts=array(); // Array of amounts - var $multicurrency_amounts=array(); // Array of amounts - var $author; - var $paiementid; // Type de paiement. Stocke dans fk_paiement + public $montant; + + public $amount; // Total amount of payment + public $amounts=array(); // Array of amounts + public $multicurrency_amounts=array(); // Array of amounts + public $author; + public $paiementid; // Type de paiement. Stocke dans fk_paiement // de llx_paiement qui est lie aux types de //paiement de llx_c_paiement - var $num_paiement; // Numero du CHQ, VIR, etc... - var $num_payment; // Numero du CHQ, VIR, etc... - var $bank_account; // Id compte bancaire du paiement - var $bank_line; // Id de la ligne d'ecriture bancaire + public $num_paiement; // Numero du CHQ, VIR, etc... + public $num_payment; // Numero du CHQ, VIR, etc... + public $bank_account; // Id compte bancaire du paiement + public $bank_line; // Id de la ligne d'ecriture bancaire // fk_paiement dans llx_paiement est l'id du type de paiement (7 pour CHQ, ...) // fk_paiement dans llx_paiement_facture est le rowid du paiement - var $fk_paiement; // Type of paiment + public $fk_paiement; // Type of paiment /** diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 7eba6afec29..29750d9d55d 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -43,33 +43,36 @@ class BonPrelevement extends CommonObject * @var string ID to identify managed object */ public $element='widthdraw'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='prelevement_bons'; - + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'payment'; - var $date_echeance; - var $raison_sociale; - var $reference_remise; - var $emetteur_code_guichet; - var $emetteur_numero_compte; - var $emetteur_code_banque; - var $emetteur_number_key; + public $date_echeance; + public $raison_sociale; + public $reference_remise; + public $emetteur_code_guichet; + public $emetteur_numero_compte; + public $emetteur_code_banque; + public $emetteur_number_key; - var $emetteur_iban; - var $emetteur_bic; - var $emetteur_ics; + public $emetteur_iban; + public $emetteur_bic; + public $emetteur_ics; - var $total; - var $_fetched; - var $statut; // 0-Wait, 1-Trans, 2-Done - var $labelstatut=array(); + public $total; + public $_fetched; + public $statut; // 0-Wait, 1-Trans, 2-Done + public $labelstatut=array(); - var $invoice_in_error=array(); - var $thirdparty_in_error=array(); + public $invoice_in_error=array(); + public $thirdparty_in_error=array(); /** diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index 48877412d76..7c68b673ac1 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -41,6 +41,9 @@ class PaymentSalary extends CommonObject */ public $table_element='payment_salary'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='payment'; public $tms; diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index bad851450a7..1fe5d448d6e 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -36,33 +36,36 @@ class ChargeSociales extends CommonObject * @var string ID to identify managed object */ public $element='chargesociales'; - + public $table='chargesociales'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='chargesociales'; - - public $picto = 'bill'; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'bill'; /** * {@inheritdoc} */ protected $table_ref_field = 'ref'; - var $date_ech; - var $lib; - var $type; - var $type_libelle; - var $amount; - var $paye; - var $periode; - var $date_creation; - var $date_modification; - var $date_validation; - var $fk_account; - var $fk_project; + public $date_ech; + public $lib; + public $type; + public $type_libelle; + public $amount; + public $paye; + public $periode; + public $date_creation; + public $date_modification; + public $date_validation; + public $fk_account; + public $fk_project; /** diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 4a989554b69..d66fb0e56c2 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -41,17 +41,22 @@ class PaymentSocialContribution extends CommonObject */ public $table_element='paiementcharge'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'payment'; public $fk_charge; public $datec=''; public $tms=''; public $datep=''; + /** * @deprecated * @see amount */ public $total; + public $amount; // Total amount of payment public $amounts=array(); // Array of amounts public $fk_typepaiement; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 6b1211cd1fc..7517ecbdbe8 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -43,23 +43,26 @@ class Tva extends CommonObject */ public $table_element='tva'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='payment'; - var $tms; - var $datep; - var $datev; - var $amount; - var $type_payment; - var $num_payment; + public $tms; + public $datep; + public $datev; + public $amount; + public $type_payment; + public $num_payment; /** * @var string label */ public $label; - var $fk_bank; - var $fk_user_creat; - var $fk_user_modif; + public $fk_bank; + public $fk_user_creat; + public $fk_user_modif; /** * Constructor From 11d75573be67ef555f9806028c3c23e98835da67 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 5 Sep 2018 12:21:13 +0200 Subject: [PATCH 02/20] 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 | 33 ++++++++++--------- htdocs/fichinter/class/fichinter.class.php | 3 ++ 17 files changed, 84 insertions(+), 23 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 4cd6fe81820..ddb9acfe39f 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 @@ class Contact extends CommonObject $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 053d51905df..c64402777e7 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 c08df837eb2..a8de26e713b 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 @@ require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php'; */ 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 4bd95caeb58..a719ef0b4fc 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 @@ require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php'; 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 0c509a1d5b3..6994aa6f3e6 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 a4ac9361a29..82e6b9e56eb 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 9ed11f41b97..376ed47c486 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 ea3ae2c67aa..e551086f9e8 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 8b4351499ce..0daf141a208 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 e18d918d56a..e1c49809f7c 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 8c4fca9d008..1ed604b56f2 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 e85cb410cd5..c5a32cc3fd6 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 97885bf2430..a5cc091a336 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 cf2d58c7ee5..2e441254acd 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 4c337825822..bd8f5901d36 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 0dceeae4808..522177c64b2 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 string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'payment'; - var $rowid; + public $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; + 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 bce5f81c339..3029306d1f2 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'; /** From 056b0b26ccf86e2a498751604b989c23bd9a2f6c Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 5 Sep 2018 15:39:04 +0200 Subject: [PATCH 03/20] fix : Public member variable _fetched must not be prefixed with an underscore --- htdocs/compta/prelevement/class/bonprelevement.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 29750d9d55d..acb9dcf2444 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -67,7 +67,7 @@ class BonPrelevement extends CommonObject public $emetteur_ics; public $total; - public $_fetched; + public $fetched; public $statut; // 0-Wait, 1-Trans, 2-Done public $labelstatut=array(); @@ -109,7 +109,7 @@ class BonPrelevement extends CommonObject $this->methodes_trans[0] = "Internet"; - $this->_fetched = 0; + $this->fetched = 0; } /** @@ -315,7 +315,7 @@ class BonPrelevement extends CommonObject $this->statut = $obj->statut; - $this->_fetched = 1; + $this->fetched = 1; return 1; } @@ -423,7 +423,7 @@ class BonPrelevement extends CommonObject $error = 0; - if ($this->_fetched == 1) + if ($this->fetched == 1) { if ($date >= $this->date_trans) { From 5a618c68084651848dac7a016b794075a87d45c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 5 Sep 2018 21:14:15 +0200 Subject: [PATCH 04/20] Update holiday.class.php --- htdocs/holiday/class/holiday.class.php | 50 +++++++++++++------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index c8f73111021..c18c0d0731a 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -906,53 +906,53 @@ class Holiday extends CommonObject if ($mode == 0) { if ($statut == 1) return $langs->trans('DraftCP'); - if ($statut == 2) return $langs->trans('ToReviewCP'); - if ($statut == 3) return $langs->trans('ApprovedCP'); - if ($statut == 4) return $langs->trans('CancelCP'); - if ($statut == 5) return $langs->trans('RefuseCP'); + elseif ($statut == 2) return $langs->trans('ToReviewCP'); + elseif ($statut == 3) return $langs->trans('ApprovedCP'); + elseif ($statut == 4) return $langs->trans('CancelCP'); + elseif ($statut == 5) return $langs->trans('RefuseCP'); } - if ($mode == 2) + elseif ($mode == 2) { $pictoapproved='statut6'; if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4'; if ($statut == 1) return img_picto($langs->trans('DraftCP'),'statut0').' '.$langs->trans('DraftCP'); // Draft - if ($statut == 2) return img_picto($langs->trans('ToReviewCP'),'statut1').' '.$langs->trans('ToReviewCP'); // Waiting approval - if ($statut == 3) return img_picto($langs->trans('ApprovedCP'),$pictoapproved).' '.$langs->trans('ApprovedCP'); - if ($statut == 4) return img_picto($langs->trans('CancelCP'),'statut5').' '.$langs->trans('CancelCP'); - if ($statut == 5) return img_picto($langs->trans('RefuseCP'),'statut5').' '.$langs->trans('RefuseCP'); + elseif ($statut == 2) return img_picto($langs->trans('ToReviewCP'),'statut1').' '.$langs->trans('ToReviewCP'); // Waiting approval + elseif ($statut == 3) return img_picto($langs->trans('ApprovedCP'),$pictoapproved).' '.$langs->trans('ApprovedCP'); + elseif ($statut == 4) return img_picto($langs->trans('CancelCP'),'statut5').' '.$langs->trans('CancelCP'); + elseif ($statut == 5) return img_picto($langs->trans('RefuseCP'),'statut5').' '.$langs->trans('RefuseCP'); } - if ($mode == 3) + elseif ($mode == 3) { $pictoapproved='statut6'; if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4'; if ($statut == 1) return img_picto($langs->trans('DraftCP'),'statut0'); - if ($statut == 2) return img_picto($langs->trans('ToReviewCP'),'statut1'); - if ($statut == 3) return img_picto($langs->trans('ApprovedCP'),$pictoapproved); - if ($statut == 4) return img_picto($langs->trans('CancelCP'),'statut5'); - if ($statut == 5) return img_picto($langs->trans('RefuseCP'),'statut5'); + elseif ($statut == 2) return img_picto($langs->trans('ToReviewCP'),'statut1'); + elseif ($statut == 3) return img_picto($langs->trans('ApprovedCP'),$pictoapproved); + elseif ($statut == 4) return img_picto($langs->trans('CancelCP'),'statut5'); + elseif ($statut == 5) return img_picto($langs->trans('RefuseCP'),'statut5'); } - if ($mode == 5) + elseif ($mode == 5) { $pictoapproved='statut6'; if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4'; if ($statut == 1) return $langs->trans('DraftCP').' '.img_picto($langs->trans('DraftCP'),'statut0'); // Draft - if ($statut == 2) return $langs->trans('ToReviewCP').' '.img_picto($langs->trans('ToReviewCP'),'statut1'); // Waiting approval - if ($statut == 3) return $langs->trans('ApprovedCP').' '.img_picto($langs->trans('ApprovedCP'),$pictoapproved); - if ($statut == 4) return $langs->trans('CancelCP').' '.img_picto($langs->trans('CancelCP'),'statut5'); - if ($statut == 5) return $langs->trans('RefuseCP').' '.img_picto($langs->trans('RefuseCP'),'statut5'); + elseif ($statut == 2) return $langs->trans('ToReviewCP').' '.img_picto($langs->trans('ToReviewCP'),'statut1'); // Waiting approval + elseif ($statut == 3) return $langs->trans('ApprovedCP').' '.img_picto($langs->trans('ApprovedCP'),$pictoapproved); + elseif ($statut == 4) return $langs->trans('CancelCP').' '.img_picto($langs->trans('CancelCP'),'statut5'); + elseif ($statut == 5) return $langs->trans('RefuseCP').' '.img_picto($langs->trans('RefuseCP'),'statut5'); } - if ($mode == 6) + elseif ($mode == 6) { $pictoapproved='statut6'; if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4'; if ($statut == 1) return $langs->trans('DraftCP').' '.img_picto($langs->trans('DraftCP'),'statut0'); // Draft - if ($statut == 2) return $langs->trans('ToReviewCP').' '.img_picto($langs->trans('ToReviewCP'),'statut1'); // Waiting approval - if ($statut == 3) return $langs->trans('ApprovedCP').' '.img_picto($langs->trans('ApprovedCP'),$pictoapproved); - if ($statut == 4) return $langs->trans('CancelCP').' '.img_picto($langs->trans('CancelCP'),'statut5'); - if ($statut == 5) return $langs->trans('RefuseCP').' '.img_picto($langs->trans('RefuseCP'),'statut5'); + elseif ($statut == 2) return $langs->trans('ToReviewCP').' '.img_picto($langs->trans('ToReviewCP'),'statut1'); // Waiting approval + elseif ($statut == 3) return $langs->trans('ApprovedCP').' '.img_picto($langs->trans('ApprovedCP'),$pictoapproved); + elseif ($statut == 4) return $langs->trans('CancelCP').' '.img_picto($langs->trans('CancelCP'),'statut5'); + elseif ($statut == 5) return $langs->trans('RefuseCP').' '.img_picto($langs->trans('RefuseCP'),'statut5'); } - return $statut; + else return $statut; } From a6d13b06b0f8f6ea04145bccaa654ea22fea7a32 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 7 Sep 2018 10:40:36 +0200 Subject: [PATCH 05/20] Standardize and update call to --- htdocs/adherents/admin/adherent.php | 4 ++-- htdocs/adherents/admin/adherent_emails.php | 4 ++-- htdocs/adherents/admin/adherent_extrafields.php | 4 ++-- htdocs/adherents/admin/adherent_type_extrafields.php | 4 ++-- htdocs/adherents/admin/website.php | 4 ++-- htdocs/adherents/agenda.php | 4 ++-- htdocs/adherents/document.php | 6 +++--- htdocs/adherents/index.php | 4 ++-- htdocs/adherents/ldap.php | 6 ++---- htdocs/adherents/note.php | 5 ++--- htdocs/adherents/stats/byproperties.php | 4 ++-- htdocs/adherents/stats/geo.php | 4 ++-- htdocs/adherents/stats/index.php | 4 ++-- htdocs/adherents/subscription/card.php | 6 ++---- htdocs/adherents/subscription/info.php | 6 ++---- htdocs/adherents/type_ldap.php | 5 ++--- 16 files changed, 33 insertions(+), 41 deletions(-) diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 2abc3b10841..ba43b6d47a6 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -33,8 +33,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; -$langs->load("admin"); -$langs->load("members"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members")); if (! $user->admin) accessforbidden(); diff --git a/htdocs/adherents/admin/adherent_emails.php b/htdocs/adherents/admin/adherent_emails.php index 76d40e57c17..60e0b2c3b48 100644 --- a/htdocs/adherents/admin/adherent_emails.php +++ b/htdocs/adherents/admin/adherent_emails.php @@ -33,8 +33,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; -$langs->load("admin"); -$langs->load("members"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members")); if (! $user->admin) accessforbidden(); diff --git a/htdocs/adherents/admin/adherent_extrafields.php b/htdocs/adherents/admin/adherent_extrafields.php index f47f92faa4c..0ec1968ab34 100644 --- a/htdocs/adherents/admin/adherent_extrafields.php +++ b/htdocs/adherents/admin/adherent_extrafields.php @@ -28,8 +28,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("members"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members")); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/adherents/admin/adherent_type_extrafields.php b/htdocs/adherents/admin/adherent_type_extrafields.php index e78c4ef29e5..3a5226d00f4 100644 --- a/htdocs/adherents/admin/adherent_type_extrafields.php +++ b/htdocs/adherents/admin/adherent_type_extrafields.php @@ -31,8 +31,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("members"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members")); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php index 75a3c4ee0d7..91df8e59ea5 100644 --- a/htdocs/adherents/admin/website.php +++ b/htdocs/adherents/admin/website.php @@ -31,8 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -$langs->load("members"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members")); $action=GETPOST('action', 'alpha'); diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index 8fb1851e021..f22070107ca 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -$langs->load("companies"); -$langs->load("members"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members")); $id = GETPOST('id','int')?GETPOST('id','int'):GETPOST('rowid','int'); diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 46b2b827d73..7e46b7864f8 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -33,9 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -$langs->load("members"); -$langs->load("companies"); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array("companies","members","other")); + $id=GETPOST('id','int'); $action=GETPOST('action','alpha'); diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 030700bb0f6..931e9323904 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; -$langs->load("companies"); -$langs->load("members"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members")); // Security check $result=restrictedArea($user,'adherent'); diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php index f7389e9fbbc..5b830623a4b 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -29,10 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -$langs->load("companies"); -$langs->load("members"); -$langs->load("ldap"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members","ldap","admin")); $rowid = GETPOST('id','int'); $action = GETPOST('action','aZ09'); diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index ae278b5dbb5..8cd12cd6ca2 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -28,9 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -$langs->load("companies"); -$langs->load("members"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members","bills")); $action=GETPOST('action','alpha'); $id=GETPOST('id','int'); diff --git a/htdocs/adherents/stats/byproperties.php b/htdocs/adherents/stats/byproperties.php index 7ae29a7eeb9..defbde2dce2 100644 --- a/htdocs/adherents/stats/byproperties.php +++ b/htdocs/adherents/stats/byproperties.php @@ -44,8 +44,8 @@ $year = strftime("%Y", time()); $startyear=$year-2; $endyear=$year; -$langs->load("members"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members")); /* diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index 9de537ed39a..2175569b7ce 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -45,8 +45,8 @@ $year = strftime("%Y", time()); $startyear=$year-2; $endyear=$year; -$langs->load("members"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members")); /* diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index 902c2d35359..e3bc7287864 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -46,8 +46,8 @@ $year = strftime("%Y", time()); $startyear=$year-2; $endyear=$year; -$langs->load("members"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members")); /* diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 34b58c5b04d..0bacc8cf863 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -29,10 +29,8 @@ if (! empty($conf->banque->enabled)) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; } -$langs->load("companies"); -$langs->load("bills"); -$langs->load("members"); -$langs->load("users"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members","bills","users")); $adh = new Adherent($db); $object = new Subscription($db); diff --git a/htdocs/adherents/subscription/info.php b/htdocs/adherents/subscription/info.php index 649a1e22996..eb8f8e4eab3 100644 --- a/htdocs/adherents/subscription/info.php +++ b/htdocs/adherents/subscription/info.php @@ -28,10 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; -$langs->load("companies"); -$langs->load("bills"); -$langs->load("members"); -$langs->load("users"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members","bills","users")); if (!$user->rights->adherent->lire) accessforbidden(); diff --git a/htdocs/adherents/type_ldap.php b/htdocs/adherents/type_ldap.php index 5d60beb2a4d..c18074130aa 100644 --- a/htdocs/adherents/type_ldap.php +++ b/htdocs/adherents/type_ldap.php @@ -29,9 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; -$langs->load("members"); -$langs->load("admin"); -$langs->load("ldap"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members","ldap")); $id = GETPOST('rowid', 'int'); $action = GETPOST('action','alpha'); From e5058a251dac8416760d7d01726483c9ac45eff8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 7 Sep 2018 12:27:08 +0200 Subject: [PATCH 06/20] Use colored gradient background on login page --- htdocs/core/tpl/login.tpl.php | 11 ++++++++++- htdocs/core/tpl/passwordforgotten.tpl.php | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 02fdedb7f2a..ccac70f4081 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -19,6 +19,7 @@ // Need global variable $title to be defined by caller (like dol_loginfunction) // Caller can also set $morelogincontent = array(['options']=>array('js'=>..., 'table'=>...); + // Protection to avoid direct call of template if (empty($conf) || ! is_object($conf)) { @@ -27,6 +28,8 @@ if (empty($conf) || ! is_object($conf)) } +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + header('Cache-Control: Public, must-revalidate'); header("Content-type: text/html; charset=".$conf->file->character_set_client); @@ -55,10 +58,16 @@ if (! preg_match('/'.constant('DOL_APPLICATION_TITLE').'/', $title)) $disablenof print top_htmlhead('', $titleofloginpage, 0, 0, $arrayofjs, array(), 0, $disablenofollow); + +$colorbackhmenu1='60,70,100'; // topmenu +if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1=$colorbackhmenu1; +$colorbackhmenu1 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$conf->global->THEME_ELDY_TOPMENU_BACK1) :(empty($user->conf->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$user->conf->THEME_ELDY_TOPMENU_BACK1); +$colorbackhmenu1=join(',',colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z' + ?> -global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file='.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>> +global->MAIN_LOGIN_BACKGROUND)?' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: linear-gradient(rgb('.$colorbackhmenu1.'), rgb(240,240,240));"':' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file='.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>> dol_use_jmobile)) { ?> -