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