Debug v21

This commit is contained in:
Laurent Destailleur 2024-11-24 13:39:16 +01:00
parent fb3c464555
commit fdf95f08f7
3 changed files with 43 additions and 1 deletions

View File

@ -515,7 +515,9 @@ class vCard
$this->setOrg($company->name);
}
$this->setURL($company->url, "");
if (!empty($company->url)) {
$this->setURL($company->url, "");
}
if ($company->phone && empty($object->office_phone)) { // If we already set the type TYPE=WORK,VOICE with office_phone
$this->setPhoneNumber($company->phone, "TYPE=WORK,VOICE");

View File

@ -184,6 +184,18 @@ if (!getDolUserInt('USER_PUBLIC_SHOW_ADDRESS', 0, $object)) {
if (getDolUserInt('USER_PUBLIC_HIDE_COMPANY', 0, $object)) {
$company = null;
}
if (getDolUserInt('SOCIETE_PUBLIC_HIDE_EMAIL', 0, $object)) {
$mysoc->email = '';
}
if (getDolUserInt('SOCIETE_PUBLIC_HIDE_OFFICE_PHONE', 0, $object)) {
$mysoc->phone = '';
}
if (getDolUserInt('SOCIETE_PUBLIC_HIDE_OFFICE_FAX', 0, $object)) {
$mysoc->fax = '';
}
if (getDolUserInt('SOCIETE_PUBLIC_HIDE_URL', 0, $object)) {
$mysoc->url = '';
}
if (getDolUserInt('USER_PUBLIC_HIDE_SOCIALNETWORKS_BUSINESS', 0, $object) && is_object($company)) {
$company->socialnetworks = [];
} else {

View File

@ -303,6 +303,34 @@ if (getDolUserInt('USER_ENABLE_PUBLIC', 0, $object)) {
print "</td></tr>\n";
if (!getDolUserString('USER_PUBLIC_HIDE_COMPANY', '', $object)) {
// Email
print '<tr class="oddeven" id="tredit"><td>';
print $langs->trans("HideOnVCard", $langs->transnoentitiesnoconv("Email"));
print '</td><td>';
print ajax_constantonoff("SOCIETE_PUBLIC_HIDE_EMAIL", array(), null, 0, 0, 1, 2, 0, 0, '', '', 'reposition', $object);
print "</td></tr>\n";
// URL
print '<tr class="oddeven" id="tredit"><td>';
print $langs->trans("HideOnVCard", $langs->transnoentitiesnoconv("URL"));
print '</td><td>';
print ajax_constantonoff("SOCIETE_PUBLIC_HIDE_URL", array(), null, 0, 0, 1, 2, 0, 0, '', '', 'reposition', $object);
print "</td></tr>\n";
// Office phone
print '<tr class="oddeven" id="tredit"><td>';
print $langs->trans("HideOnVCard", $langs->transnoentitiesnoconv("Phone"));
print '</td><td>';
print ajax_constantonoff("SOCIETE_PUBLIC_HIDE_OFFICE_PHONE", array(), null, 0, 0, 1, 2, 0, 0, '', '', 'reposition', $object);
print "</td></tr>\n";
// Office fax
print '<tr class="oddeven" id="tredit"><td>';
print $langs->trans("HideOnVCard", $langs->transnoentitiesnoconv("Fax"));
print '</td><td>';
print ajax_constantonoff("SOCIETE_PUBLIC_HIDE_OFFICE_FAX", array(), null, 0, 0, 1, 2, 0, 0, '', '', 'reposition', $object);
print "</td></tr>\n";
// Social networks
print '<tr class="oddeven" id="tredit"><td>';
print $langs->trans("HideOnVCard", $langs->transnoentitiesnoconv("SocialNetworksInformation"));