diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 56e7868ec5a..b70274c10cc 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -6,7 +6,7 @@ * Copyright (C) 2012 Marcos García * Copyright (C) 2012-2020 Philippe Grand * Copyright (C) 2015-2018 Alexandre Spangaro - * Copyright (C) 2018-2021 Frédéric France + * Copyright (C) 2018-2022 Frédéric France * Copyright (C) 2021 Waël Almoman * * This program is free software; you can redistribute it and/or modify @@ -305,23 +305,23 @@ if (empty($reshook)) { $object->phone = trim(GETPOST("phone", 'alpha')); $object->phone_perso = trim(GETPOST("phone_perso", 'alpha')); $object->phone_mobile = trim(GETPOST("phone_mobile", 'alpha')); - $object->email = preg_replace('/\s+/', '', GETPOST("member_email", 'alpha')); - $object->url = trim(GETPOST('member_url', 'custom', 0, FILTER_SANITIZE_URL)); + $object->email = preg_replace('/\s+/', '', GETPOST("member_email", 'alpha')); + $object->url = trim(GETPOST('member_url', 'custom', 0, FILTER_SANITIZE_URL)); $object->socialnetworks = array(); foreach ($socialnetworks as $key => $value) { if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') { $object->socialnetworks[$key] = trim(GETPOST($key, 'alphanohtml')); } } - //$object->skype = trim(GETPOST("skype", 'alpha')); - //$object->twitter = trim(GETPOST("twitter", 'alpha')); - //$object->facebook = trim(GETPOST("facebook", 'alpha')); - //$object->linkedin = trim(GETPOST("linkedin", 'alpha')); - $object->birth = $birthdate; + //$object->skype = trim(GETPOST("skype", 'alpha')); + //$object->twitter = trim(GETPOST("twitter", 'alpha')); + //$object->facebook = trim(GETPOST("facebook", 'alpha')); + //$object->linkedin = trim(GETPOST("linkedin", 'alpha')); + $object->birth = $birthdate; $object->default_lang = GETPOST('default_lang', 'alpha'); - $object->typeid = GETPOST("typeid", 'int'); - //$object->note = trim(GETPOST("comment","alpha")); - $object->morphy = GETPOST("morphy", 'alpha'); + $object->typeid = GETPOST("typeid", 'int'); + //$object->note = trim(GETPOST("comment","alpha")); + $object->morphy = GETPOST("morphy", 'alpha'); if (GETPOST('deletephoto', 'alpha')) { $object->photo = ''; @@ -330,8 +330,8 @@ if (empty($reshook)) { } // Get status and public property - $object->statut = GETPOST("statut", 'alpha'); - $object->public = GETPOST("public", 'alpha'); + $object->statut = GETPOST("statut", 'alpha'); + $object->public = GETPOST("public", 'alpha'); // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET'); @@ -454,7 +454,7 @@ if (empty($reshook)) { // $facebook=GETPOST("member_facebook", 'alpha'); // $linkedin=GETPOST("member_linkedin", 'alpha'); $email = preg_replace('/\s+/', '', GETPOST("member_email", 'alpha')); - $url = trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL)); + $url = trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL)); $login = GETPOST("member_login", 'alphanohtml'); $pass = GETPOST("password", 'none'); // For password, we use 'none' $photo = GETPOST("photo", 'alphanohtml'); @@ -1524,7 +1524,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { $subject = $arraydefaultmessage->topic; - $msg = $arraydefaultmessage->content; + $msg = $arraydefaultmessage->content; } $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); @@ -1533,10 +1533,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnValid()), $substitutionarray, $outputlangs); $tmp = $langs->trans("SendingAnEMailToMember"); - $tmp .= '
'.$langs->trans("MailFrom").': '.$conf->global->ADHERENT_MAIL_FROM.', '; + $tmp .= '
'.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').', '; $tmp .= '
'.$langs->trans("MailRecipient").': '.$object->email.''; $helpcontent = ''; - $helpcontent .= ''.$langs->trans("MailFrom").': '.$conf->global->ADHERENT_MAIL_FROM.'
'."\n"; + $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').'
'."\n"; $helpcontent .= ''.$langs->trans("MailRecipient").': '.$object->email.'
'."\n"; $helpcontent .= ''.$langs->trans("Subject").':
'."\n"; $helpcontent .= $subjecttosend."\n"; @@ -1596,10 +1596,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnResiliate()), $substitutionarray, $outputlangs); $tmp = $langs->trans("SendingAnEMailToMember"); - $tmp .= '
('.$langs->trans("MailFrom").': '.$conf->global->ADHERENT_MAIL_FROM.', '; + $tmp .= '
('.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').', '; $tmp .= $langs->trans("MailRecipient").': '.$object->email.')'; $helpcontent = ''; - $helpcontent .= ''.$langs->trans("MailFrom").': '.$conf->global->ADHERENT_MAIL_FROM.'
'."\n"; + $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').'
'."\n"; $helpcontent .= ''.$langs->trans("MailRecipient").': '.$object->email.'
'."\n"; $helpcontent .= ''.$langs->trans("Subject").':
'."\n"; $helpcontent .= $subjecttosend."\n"; @@ -1656,10 +1656,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnExclude()), $substitutionarray, $outputlangs); $tmp = $langs->trans("SendingAnEMailToMember"); - $tmp .= '
('.$langs->trans("MailFrom").': '.$conf->global->ADHERENT_MAIL_FROM.', '; + $tmp .= '
('.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').', '; $tmp .= $langs->trans("MailRecipient").': '.$object->email.')'; $helpcontent = ''; - $helpcontent .= ''.$langs->trans("MailFrom").': '.$conf->global->ADHERENT_MAIL_FROM.'
'."\n"; + $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').'
'."\n"; $helpcontent .= ''.$langs->trans("MailRecipient").': '.$object->email.'
'."\n"; $helpcontent .= ''.$langs->trans("Subject").':
'."\n"; $helpcontent .= $subjecttosend."\n"; diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 4c68b3e91ec..ad3de63930a 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -425,8 +425,8 @@ class Adherent extends CommonObject // Envoi mail confirmation $from = $conf->email_from; - if (!empty($conf->global->ADHERENT_MAIL_FROM)) { - $from = $conf->global->ADHERENT_MAIL_FROM; + if (!empty(getDolGlobalString('ADHERENT_MAIL_FROM'))) { + $from = getDolGlobalString('ADHERENT_MAIL_FROM'); } $trackid = 'mem'.$this->id; @@ -3015,7 +3015,7 @@ class Adherent extends CommonObject $subject = make_substitutions($arraydefaultmessage->topic, $substitutionarray, $outputlangs); $msg = make_substitutions($arraydefaultmessage->content, $substitutionarray, $outputlangs); - $from = $conf->global->ADHERENT_MAIL_FROM; + $from = getDolGlobalString('ADHERENT_MAIL_FROM'); $to = $adherent->email; $trackid = 'mem'.$adherent->id; diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 93b57a630e1..aa505691fda 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -1142,7 +1142,7 @@ if ($rowid > 0) { $tmp = 'global->ADHERENT_DEFAULT_SENDINFOBYMAIL) ? ' checked' : '')).'>'; $helpcontent = ''; - $helpcontent .= ''.$langs->trans("MailFrom").': '.$conf->global->ADHERENT_MAIL_FROM.'
'."\n"; + $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').'
'."\n"; $helpcontent .= ''.$langs->trans("MailRecipient").': '.$object->email.'
'."\n"; $helpcontent .= ''.$langs->trans("MailTopic").':
'."\n"; if ($subjecttosend) { diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 5f5e560c87d..562000c0651 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -404,7 +404,7 @@ if (empty($reshook) && $action == 'add') { } $to = $adh->makeSubstitution($conf->global->MAIN_INFO_SOCIETE_MAIL); - $from = $conf->global->ADHERENT_MAIL_FROM; + $from = getDolGlobalString('ADHERENT_MAIL_FROM'); $mailfile = new CMailFile( '['.$appli.'] '.$conf->global->ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT, $to,