From a4563c7ad4f0fcc819aa6374ed8d750381cc894d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 1 May 2023 14:47:21 +0200 Subject: [PATCH] Close #24625 --- htdocs/core/class/commonpeople.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commonpeople.class.php b/htdocs/core/class/commonpeople.class.php index d3b29fdb915..54180eb626c 100644 --- a/htdocs/core/class/commonpeople.class.php +++ b/htdocs/core/class/commonpeople.class.php @@ -76,13 +76,16 @@ trait CommonPeople $thirdpartyid = 0; $elementforaltlanguage = $this->element; if ($this->element == 'societe') { + /** @var Societe $this */ $thirdpartyid = $this->id; } if ($this->element == 'contact') { + /** @var Contact $this */ $contactid = $this->id; $thirdpartyid = empty($this->fk_soc) ? 0 : $this->fk_soc; } if ($this->element == 'user') { + /** @var User $this */ $contactid = $this->contact_id; $thirdpartyid = empty($object->fk_soc) ? 0 : $object->fk_soc; } @@ -90,7 +93,7 @@ trait CommonPeople $out = ''; $outdone = 0; - $coords = $this->getFullAddress(1, ', ', (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) ? $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT : 0)); + $coords = $this->getFullAddress(1, ', ', getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT')); if ($coords) { if (!empty($conf->use_javascript_ajax)) { // Add picto with tooltip on map