From 1f738e5a7bee55e40cf86aa5e4a9678ffe799078 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 19 Dec 2023 17:46:39 +0100 Subject: [PATCH] Clean code --- htdocs/contact/class/contact.class.php | 2 -- htdocs/core/class/commonobject.class.php | 2 -- htdocs/core/class/commonpeople.class.php | 2 -- htdocs/societe/class/societe.class.php | 2 +- 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index aa20ebe69c0..cf0599e3e00 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -356,8 +356,6 @@ class Contact extends CommonObject */ public function __construct($db) { - global $conf, $langs; - $this->db = $db; $this->statut = 1; // By default, status is enabled diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 30f8833f2ab..4ab1a0577ff 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1738,8 +1738,6 @@ abstract class CommonObject public function fetch_thirdparty($force_thirdparty_id = 0) { // phpcs:enable - global $conf; - if (empty($this->socid) && empty($this->fk_soc) && empty($force_thirdparty_id)) { return 0; } diff --git a/htdocs/core/class/commonpeople.class.php b/htdocs/core/class/commonpeople.class.php index aac008ac91b..2b1145edb7f 100644 --- a/htdocs/core/class/commonpeople.class.php +++ b/htdocs/core/class/commonpeople.class.php @@ -276,8 +276,6 @@ trait CommonPeople */ public function setUpperOrLowerCase() { - global $conf; - if (getDolGlobalString('MAIN_FIRST_TO_UPPER')) { $this->lastname = dol_ucwords(dol_strtolower($this->lastname)); $this->firstname = dol_ucwords(dol_strtolower($this->firstname)); diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 0f70260d99f..6d173cd11a2 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -888,7 +888,7 @@ class Societe extends CommonObject */ public function create(User $user, $notrigger = 0) { - global $langs, $conf, $mysoc; + global $langs, $conf; $error = 0;