clean
This commit is contained in:
parent
6c3a9cbc40
commit
346fe8ae85
@ -694,17 +694,14 @@ abstract class CommonObject
|
||||
$contactid = 0;
|
||||
$thirdpartyid = 0;
|
||||
$elementforaltlanguage = $this->element;
|
||||
if ($this->element == 'societe')
|
||||
{
|
||||
if ($this->element == 'societe') {
|
||||
$thirdpartyid = $this->id;
|
||||
}
|
||||
if ($this->element == 'contact')
|
||||
{
|
||||
if ($this->element == 'contact') {
|
||||
$contactid = $this->id;
|
||||
$thirdpartyid = $object->fk_soc;
|
||||
}
|
||||
if ($this->element == 'user')
|
||||
{
|
||||
if ($this->element == 'user') {
|
||||
$contactid = $this->contact_id;
|
||||
$thirdpartyid = $object->fk_soc;
|
||||
}
|
||||
@ -773,46 +770,51 @@ abstract class CommonObject
|
||||
|
||||
if (!empty($this->phone) || !empty($this->phone_pro) || !empty($this->phone_mobile) || !empty($this->phone_perso) || !empty($this->fax) || !empty($this->office_phone) || !empty($this->user_mobile) || !empty($this->office_fax)) $out .= ($outdone ? '<br>' : '');
|
||||
if (!empty($this->phone) && empty($this->phone_pro)) { // For objects that store pro phone into ->phone
|
||||
$out .= dol_print_phone($this->phone, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePro")); $outdone++;
|
||||
$out .= dol_print_phone($this->phone, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePro"));
|
||||
$outdone++;
|
||||
}
|
||||
if (!empty($this->phone_pro)) {
|
||||
$out .= dol_print_phone($this->phone_pro, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePro")); $outdone++;
|
||||
$out .= dol_print_phone($this->phone_pro, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePro"));
|
||||
$outdone++;
|
||||
}
|
||||
if (!empty($this->phone_mobile)) {
|
||||
$out .= dol_print_phone($this->phone_mobile, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'mobile', $langs->trans("PhoneMobile")); $outdone++;
|
||||
$out .= dol_print_phone($this->phone_mobile, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'mobile', $langs->trans("PhoneMobile"));
|
||||
$outdone++;
|
||||
}
|
||||
if (!empty($this->phone_perso)) {
|
||||
$out .= dol_print_phone($this->phone_perso, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePerso")); $outdone++;
|
||||
$out .= dol_print_phone($this->phone_perso, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePerso"));
|
||||
$outdone++;
|
||||
}
|
||||
if (!empty($this->office_phone)) {
|
||||
$out .= dol_print_phone($this->office_phone, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePro")); $outdone++;
|
||||
$out .= dol_print_phone($this->office_phone, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePro"));
|
||||
$outdone++;
|
||||
}
|
||||
if (!empty($this->user_mobile)) {
|
||||
$out .= dol_print_phone($this->user_mobile, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'mobile', $langs->trans("PhoneMobile")); $outdone++;
|
||||
$out .= dol_print_phone($this->user_mobile, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'mobile', $langs->trans("PhoneMobile"));
|
||||
$outdone++;
|
||||
}
|
||||
if (!empty($this->fax)) {
|
||||
$out .= dol_print_phone($this->fax, $this->country_code, $contactid, $thirdpartyid, 'AC_FAX', ' ', 'fax', $langs->trans("Fax")); $outdone++;
|
||||
$out .= dol_print_phone($this->fax, $this->country_code, $contactid, $thirdpartyid, 'AC_FAX', ' ', 'fax', $langs->trans("Fax"));
|
||||
$outdone++;
|
||||
}
|
||||
if (!empty($this->office_fax)) {
|
||||
$out .= dol_print_phone($this->office_fax, $this->country_code, $contactid, $thirdpartyid, 'AC_FAX', ' ', 'fax', $langs->trans("Fax")); $outdone++;
|
||||
$out .= dol_print_phone($this->office_fax, $this->country_code, $contactid, $thirdpartyid, 'AC_FAX', ' ', 'fax', $langs->trans("Fax"));
|
||||
$outdone++;
|
||||
}
|
||||
|
||||
if ($out) $out .= '<div style="clear: both;"></div>';
|
||||
$outdone = 0;
|
||||
if (!empty($this->email))
|
||||
{
|
||||
if (!empty($this->email)) {
|
||||
$out .= dol_print_email($this->email, $this->id, $object->id, 'AC_EMAIL', 0, 0, 1);
|
||||
$outdone++;
|
||||
}
|
||||
if (!empty($this->url))
|
||||
{
|
||||
if (!empty($this->url)) {
|
||||
//$out.=dol_print_url($this->url,'_goout',0,1);//steve changed to blank
|
||||
$out .= dol_print_url($this->url, '_blank', 0, 1);
|
||||
$outdone++;
|
||||
}
|
||||
|
||||
if (!empty($conf->socialnetworks->enabled))
|
||||
{
|
||||
if (!empty($conf->socialnetworks->enabled)) {
|
||||
$outsocialnetwork = '';
|
||||
|
||||
if (is_array($this->socialnetworks) && count($this->socialnetworks) > 0) {
|
||||
@ -823,7 +825,7 @@ abstract class CommonObject
|
||||
}
|
||||
$outdone++;
|
||||
}
|
||||
} else { // Old code
|
||||
} else { // Old code to remove
|
||||
if ($this->skype) $outsocialnetwork .= dol_print_socialnetworks($this->skype, $this->id, $object->id, 'skype');
|
||||
$outdone++;
|
||||
if ($this->jabberid) $outsocialnetwork .= dol_print_socialnetworks($this->jabberid, $this->id, $object->id, 'jabber');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user