diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php
index 8fcbc898844..2d3133c9fce 100644
--- a/htdocs/admin/mails.php
+++ b/htdocs/admin/mails.php
@@ -48,7 +48,7 @@ $substitutionarrayfortest = array(
'__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT,
'__ID__' => 'RecipientIdRecord',
//'__EMAIL__' => 'RecipientEMail', // Done into actions_sendmails
- '__CHECK_READ__' => (is_object($object) && !empty($object->thirdparty) && is_object($object->thirdparty)) ? '
' : '',
+ '__CHECK_READ__' => (!empty($object) && is_object($object) && is_object($object->thirdparty)) ? '
' : '',
'__USER_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), // Done into actions_sendmails
'__LOGIN__' => 'RecipientLogin',
'__LASTNAME__' => 'RecipientLastname',
@@ -737,14 +737,14 @@ if ($action == 'edit') {
print '
| '.$langs->trans('MAIN_MAIL_DEFAULT_FROMTYPE').' | ';
print '';
- if (!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE) && $conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'robot') {
+ if (getDolGlobalString('MAIN_MAIL_DEFAULT_FROMTYPE') === 'robot') {
print $langs->trans('RobotEmail');
- } elseif (!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE) && $conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'user') {
+ } elseif (getDolGlobalString('MAIN_MAIL_DEFAULT_FROMTYPE') === 'user') {
print $langs->trans('UserEmail');
- } elseif (!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE) && $conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'company') {
+ } elseif (getDolGlobalString('MAIN_MAIL_DEFAULT_FROMTYPE') === 'company') {
print $langs->trans('CompanyEmail').' '.dol_escape_htmltag('<'.$mysoc->email.'>');
} else {
- $id = preg_replace('/senderprofile_/', '', !empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE) ? $conf->global->MAIN_MAIL_DEFAULT_FROMTYPE : '');
+ $id = preg_replace('/senderprofile_/', '', getDolGlobalString('MAIN_MAIL_DEFAULT_FROMTYPE'));
if ($id > 0) {
include_once DOL_DOCUMENT_ROOT.'/core/class/emailsenderprofile.class.php';
$emailsenderprofile = new EmailSenderProfile($db);
@@ -756,7 +756,7 @@ if ($action == 'edit') {
// Errors To
print ' |
| '.$langs->trans("MAIN_MAIL_ERRORS_TO").' | ';
- print ''.(!empty($conf->global->MAIN_MAIL_ERRORS_TO) ? $conf->global->MAIN_MAIL_ERRORS_TO : '');
+ print ' | '.(getDolGlobalString('MAIN_MAIL_ERRORS_TO'));
if (!empty($conf->global->MAIN_MAIL_ERRORS_TO) && !isValidEmail($conf->global->MAIN_MAIL_ERRORS_TO)) {
print img_warning($langs->trans("ErrorBadEMail"));
}
diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php
index 530860dee71..50b27b30964 100644
--- a/htdocs/admin/system/filecheck.php
+++ b/htdocs/admin/system/filecheck.php
@@ -53,8 +53,8 @@ print ''.$langs->trans("FileCheckDesc").'
print '';
print ' ';
print '| '.$langs->trans("Version").' | '.$langs->trans("Value").' | '."\n";
-print '| '.$langs->trans("VersionLastInstall").' | '.$conf->global->MAIN_VERSION_LAST_INSTALL.' | '."\n";
-print '| '.$langs->trans("VersionLastUpgrade").' | '.$conf->global->MAIN_VERSION_LAST_UPGRADE.' | '."\n";
+print '| '.$langs->trans("VersionLastInstall").' | '.getDolGlobalString('MAIN_VERSION_LAST_INSTALL').' | '."\n";
+print '| '.$langs->trans("VersionLastUpgrade").' | '.getDolGlobalString('MAIN_VERSION_LAST_UPGRADE').' | '."\n";
print '| '.$langs->trans("VersionProgram").' | '.DOL_VERSION;
// If current version differs from last upgrade
if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE)) {
@@ -171,7 +171,7 @@ if (GETPOST('target') == 'remote') {
}
-if (!$error && $xml) {
+if (empty($error) && !empty($xml)) {
$checksumconcat = array();
$file_list = array();
$out = '';
diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php
index 0d4f60f3851..428c80676a2 100644
--- a/htdocs/admin/tools/dolibarr_export.php
+++ b/htdocs/admin/tools/dolibarr_export.php
@@ -157,7 +157,7 @@ $title = $langs->trans("BackupDumpWizard");
print load_fiche_titre($title);
-print '';
+print '';
print '';
print '';
print $langs->trans("DatabaseName").' : '.$dolibarr_main_db_name.' ';
diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php
index 935804ada10..fbc2412a9df 100644
--- a/htdocs/admin/tools/listevents.php
+++ b/htdocs/admin/tools/listevents.php
@@ -42,7 +42,7 @@ if ($user->socid > 0) {
}
// Load translation files required by the page
-$langs->loadLangs(array("companies", "admin", "users", "other"));
+$langs->loadLangs(array("companies", "admin", "users", "other","withdrawals"));
// Load variable for pagination
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
@@ -285,7 +285,7 @@ if ($result) {
$param .= "&date_endyear=".urlencode($date_endyear);
}
- $langs->load('withdrawals');
+ $center = '';
if ($num) {
$center = ''.$langs->trans("Purge").'';
}
diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php
index 513b73658f7..303382f285b 100644
--- a/htdocs/core/lib/admin.lib.php
+++ b/htdocs/core/lib/admin.lib.php
@@ -906,7 +906,7 @@ function listOfSessions()
if (preg_match('/dol_login/i', $sessValues) && // limit to dolibarr session
(preg_match('/dol_entity\|i:'.$conf->entity.';/i', $sessValues) || preg_match('/dol_entity\|s:([0-9]+):"'.$conf->entity.'"/i', $sessValues)) && // limit to current entity
- preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i', $sessValues)) { // limit to company name
+ preg_match('/dol_company\|s:([0-9]+):"('.getDolGlobalString('MAIN_INFO_SOCIETE_NOM').')"/i', $sessValues)) { // limit to company name
$tmp = explode('_', $file);
$idsess = $tmp[1];
$regs = array();
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index 891c71867eb..981374996cf 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -2411,8 +2411,18 @@ class User extends CommonObject
$label .= ' '.$langs->trans("Job").': '.dol_string_nohtmltag($this->job);
}
$label .= ' '.$langs->trans("Email").': '.dol_string_nohtmltag($this->email);
- if (!empty($this->phone)) {
- $label .= ' '.$langs->trans("Phone").': '.dol_string_nohtmltag($this->phone);
+ if (!empty($this->office_phone) || !empty($this->office_fax) || !empty($this->fax)) {
+ $phonelist = array();
+ if ($this->office_phone) {
+ $phonelist[] = dol_print_phone($this->office_phone, $this->country_code, $this->id, 0, '', ' ', 'phone');
+ }
+ if ($this->office_fax) {
+ $phonelist[] = dol_print_phone($this->office_fax, $this->country_code, $this->id, 0, '', ' ', 'fax');
+ }
+ if ($this->user_mobile) {
+ $phonelist[] = dol_print_phone($this->user_mobile, $this->country_code, $this->id, 0, '', ' ', 'mobile');
+ }
+ $label .= ' '.$langs->trans('Phone').': '.implode(' ', $phonelist);
}
if (!empty($this->admin)) {
$label .= ' '.$langs->trans("Administrator").': '.yn($this->admin);
| | |