diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index 871ae62db36..4d9db893bd0 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -2137,20 +2137,19 @@ class Contact extends CommonObject
}
$return .= '';
$return .= '
';
- $return .= '
'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).'';
- if (property_exists($this, 'socid') && !is_null($this->socid)) {
- $return .= '
'.$this->socid.'';
- } else {
- if (property_exists($this, 'phone_pro')) {
- $return .= '
'.$langs->trans("Phone").'';
- $return .= '
: '.$this->phone_pro.'';
- }
- }
+ $return .= '
'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).'
';
- if (method_exists($this, 'LibPubPriv')) {
+ if (property_exists($this, 'thirdparty') && is_object($this->thirdparty)) {
+ $return .= '
'.$this->thirdparty->getNomUrl(1).'
';
+ }
+ /*if (property_exists($this, 'phone_pro') && !empty($this->phone_pro)) {
+ $return .= '
'.img_picto($langs->trans("Phone"), 'phone');
+ $return .= '
'.$this->phone_pro.'';
+ }*/
+ /*if (method_exists($this, 'LibPubPriv')) {
$return .= '
'.$langs->trans("Visibility").'';
$return .= '
: '.$this->LibPubPriv($this->priv).'';
- }
+ }*/
if (method_exists($this, 'getLibStatut')) {
$return .= '
'.$this->getLibStatut(5).'
';
}
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index e392978ecc1..852f00349c0 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -1185,10 +1185,8 @@ while ($i < min($num, $limit)) {
print '
';
}
$contactstatic->photo = $obj->photo;
- $soc = new Societe($db);
- $soc->fetch($obj->socid);
- if ($obj->socid) {
- $contactstatic->socid = $soc->getNomUrl(1);
+ if ($obj->socid > 0) {
+ $contactstatic->fetch_thirdparty($obj->socid);
}
print $contactstatic->getKanbanView('');
if ($i == min($num, $limit) - 1) {