From 73c199adbfc39f54f1ccbece4958dd84bcd4f022 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 24 Aug 2023 16:15:18 +0200 Subject: [PATCH] Fix warnings --- htdocs/core/class/conf.class.php | 47 ++++++++++++++++++++--- htdocs/core/class/html.formfile.class.php | 3 +- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index d6fe4cb935e..ed8603b1359 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -105,6 +105,17 @@ class Conf public $dol_no_mouse_hover; // Set if we force param dol_no_mouse_hover into login url or if browser is smartphone public $dol_use_jmobile; // Set if we force param dol_use_jmobile into login url. 0=default, 1=to say we use app from a webview app, 2=to say we use app from a webview app and keep ajax + public $format_date_short; // Format of day with PHP/C tags (strftime functions) + public $format_date_short_java; // Format of day with Java tags + public $format_hour_short; + public $format_hour_short_duration; + public $format_date_text_short; + public $format_date_text; + public $format_date_hour_short; + public $format_date_hour_sec_short; + public $format_date_hour_text_short; + public $format_date_hour_text; + public $liste_limit; public $tzuserinputkey = 'tzserver'; // Use 'tzuserrel' to always store date in GMT and show date in time zone of user. @@ -113,20 +124,44 @@ class Conf // TODO Remove this part. public $fournisseur; public $product; + /** + * @deprecated Use product + */ + public $produit; public $service; + /** + * @deprecated Use contract + */ public $contrat; + public $contract; public $actions; public $agenda; public $commande; public $propal; + /** + * @deprecated Use invoice + */ public $facture; + public $invoice; public $user; + /** + * @deprecated Use member + */ public $adherent; + public $member; public $bank; public $notification; public $expensereport; public $productbatch; - + /** + * @deprecated Use project + */ + public $projet; + public $project; + public $supplier_proposal; + public $supplier_order; + public $supplier_invoice; + public $category; /** @@ -536,11 +571,11 @@ class Conf $this->fournisseur->facture->dir_output = $rootfordata."/fournisseur/facture"; // For backward compatibility $this->fournisseur->facture->dir_temp = $rootfortemp."/fournisseur/facture/temp"; // For backward compatibility - $this->supplierproposal = new stdClass(); - $this->supplierproposal->multidir_output = array($this->entity => $rootfordata."/supplier_proposal"); - $this->supplierproposal->multidir_temp = array($this->entity => $rootfortemp."/supplier_proposal/temp"); - $this->supplierproposal->dir_output = $rootfordata."/supplier_proposal"; // For backward compatibility - $this->supplierproposal->dir_temp = $rootfortemp."/supplier_proposal/temp"; // For backward compatibility + $this->supplier_proposal = new stdClass(); + $this->supplier_proposal->multidir_output = array($this->entity => $rootfordata."/supplier_proposal"); + $this->supplier_proposal->multidir_temp = array($this->entity => $rootfortemp."/supplier_proposal/temp"); + $this->supplier_proposal->dir_output = $rootfordata."/supplier_proposal"; // For backward compatibility + $this->supplier_proposal->dir_temp = $rootfortemp."/supplier_proposal/temp"; // For backward compatibility $this->fournisseur->payment = new stdClass(); $this->fournisseur->payment->multidir_output = array($this->entity => $rootfordata."/fournisseur/payment"); diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index bb4bb5032d5..58b3b6f0d14 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -585,7 +585,8 @@ class FormFile $modellist = $genallowed; } else { include_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php'; - $modellist = ModeleExports::liste_modeles($this->db); + //$modellist = ModeleExports::liste_modeles($this->db); // liste_modeles() does not exists. We are using listOfAvailableExportFormat() method instead that return a different array format. + $modellist = array(); } } elseif ($modulepart == 'commande_fournisseur' || $modulepart == 'supplier_order') { if (is_array($genallowed)) {