Merge pull request #12242 from frederic34/patch-20
Update contact.class.php
This commit is contained in:
commit
cbc57f15d1
@ -1264,23 +1264,24 @@ class Contact extends CommonObject
|
|||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
if (empty($this->status) || empty($this->statusshort))
|
$labelstatus = array(
|
||||||
{
|
0 => 'ActivityCeased',
|
||||||
$this->labelstatus[0] = 'ActivityCeased';
|
1 => 'InActivity',
|
||||||
$this->labelstatusshort[0] = 'ActivityCeased';
|
4 => 'InActivity',
|
||||||
$this->labelstatus[5] = 'ActivityCeased';
|
5 => 'ActivityCeased',
|
||||||
$this->labelstatusshort[5] = 'ActivityCeased';
|
);
|
||||||
$this->labelstatus[1] = 'InActivity';
|
$labelstatusshort = array(
|
||||||
$this->labelstatusshort[1] = 'InActivity';
|
0 => 'ActivityCeased',
|
||||||
$this->labelstatus[4] = 'InActivity';
|
1 => 'InActivity',
|
||||||
$this->labelstatusshort[4] = 'InActivity';
|
4 => 'InActivity',
|
||||||
}
|
5 => 'ActivityCeased',
|
||||||
|
);
|
||||||
|
|
||||||
$statusType = 'status4';
|
$statusType = 'status4';
|
||||||
if ($status==0 || $status==5) $statusType = 'status5';
|
if ($status==0 || $status==5) $statusType = 'status5';
|
||||||
|
|
||||||
$label = $langs->trans($this->labelstatus[$status]);
|
$label = $langs->trans($labelstatus[$status]);
|
||||||
$labelshort = $langs->trans($this->labelstatusshort[$status]);
|
$labelshort = $langs->trans($labelstatusshort[$status]);
|
||||||
|
|
||||||
return dolGetStatus($label, $labelshort, '', $statusType, $mode);
|
return dolGetStatus($label, $labelshort, '', $statusType, $mode);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user