forked from Wavyzz/dolibarr
Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -355,6 +355,15 @@ class CMailFile
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We always use a replyto
|
||||||
|
if (empty($replyto)) {
|
||||||
|
$replyto = dol_sanitizeEmail($from);
|
||||||
|
}
|
||||||
|
// We can force the from
|
||||||
|
if (getDolGlobalString('MAIN_MAIL_FORCE_FROM')) {
|
||||||
|
$from = getDolGlobalString('MAIN_MAIL_FORCE_FROM');
|
||||||
|
}
|
||||||
|
|
||||||
$this->subject = $subject;
|
$this->subject = $subject;
|
||||||
$this->addr_to = dol_sanitizeEmail($to);
|
$this->addr_to = dol_sanitizeEmail($to);
|
||||||
$this->addr_from = dol_sanitizeEmail($from);
|
$this->addr_from = dol_sanitizeEmail($from);
|
||||||
@@ -362,9 +371,6 @@ class CMailFile
|
|||||||
$this->addr_cc = dol_sanitizeEmail($addr_cc);
|
$this->addr_cc = dol_sanitizeEmail($addr_cc);
|
||||||
$this->addr_bcc = dol_sanitizeEmail($addr_bcc);
|
$this->addr_bcc = dol_sanitizeEmail($addr_bcc);
|
||||||
$this->deliveryreceipt = $deliveryreceipt;
|
$this->deliveryreceipt = $deliveryreceipt;
|
||||||
if (empty($replyto)) {
|
|
||||||
$replyto = dol_sanitizeEmail($from);
|
|
||||||
}
|
|
||||||
$this->reply_to = dol_sanitizeEmail($replyto);
|
$this->reply_to = dol_sanitizeEmail($replyto);
|
||||||
$this->errors_to = dol_sanitizeEmail($errors_to);
|
$this->errors_to = dol_sanitizeEmail($errors_to);
|
||||||
$this->trackid = $trackid;
|
$this->trackid = $trackid;
|
||||||
@@ -375,7 +381,7 @@ class CMailFile
|
|||||||
$this->cid_list = $cid_list;
|
$this->cid_list = $cid_list;
|
||||||
|
|
||||||
if (getDolGlobalString('MAIN_MAIL_FORCE_SENDTO')) {
|
if (getDolGlobalString('MAIN_MAIL_FORCE_SENDTO')) {
|
||||||
$this->addr_to = dol_sanitizeEmail($conf->global->MAIN_MAIL_FORCE_SENDTO);
|
$this->addr_to = dol_sanitizeEmail(getDolGlobalString('MAIN_MAIL_FORCE_SENDTO'));
|
||||||
$this->addr_cc = '';
|
$this->addr_cc = '';
|
||||||
$this->addr_bcc = '';
|
$this->addr_bcc = '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9698,8 +9698,8 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1'
|
|||||||
$scheck = preg_replace('/->[a-zA-Z0-9_]+\(/', '->__METHOD__', $s); // accept parenthesis in '...->method(...'
|
$scheck = preg_replace('/->[a-zA-Z0-9_]+\(/', '->__METHOD__', $s); // accept parenthesis in '...->method(...'
|
||||||
$scheck = preg_replace('/^\(/', '__PARENTHESIS__ ', $scheck); // accept parenthesis in '(...'. Must replace with __PARENTHESIS__ with a space after to allow following substitutions
|
$scheck = preg_replace('/^\(/', '__PARENTHESIS__ ', $scheck); // accept parenthesis in '(...'. Must replace with __PARENTHESIS__ with a space after to allow following substitutions
|
||||||
$scheck = preg_replace('/\s\(/', '__PARENTHESIS__ ', $scheck); // accept parenthesis in '... ('. Must replace with __PARENTHESIS__ with a space after to allow following substitutions
|
$scheck = preg_replace('/\s\(/', '__PARENTHESIS__ ', $scheck); // accept parenthesis in '... ('. Must replace with __PARENTHESIS__ with a space after to allow following substitutions
|
||||||
$scheck = preg_replace('/^!?[a-zA-Z0-9_]+\(/', '$1__FUNCTION__', $scheck); // accept parenthesis in 'function(' and '!function('
|
$scheck = preg_replace('/^!?[a-zA-Z0-9_]+\(/', '__FUNCTION__', $scheck); // accept parenthesis in 'function(' and '!function('
|
||||||
$scheck = preg_replace('/\s!?[a-zA-Z0-9_]+\(/', '$1__FUNCTION__', $scheck); // accept parenthesis in '... function(' and '... !function('
|
$scheck = preg_replace('/\s!?[a-zA-Z0-9_]+\(/', '__FUNCTION__', $scheck); // accept parenthesis in '... function(' and '... !function('
|
||||||
$scheck = preg_replace('/(\^|\')\(/', '__REGEXSTART__', $scheck); // To allow preg_match('/^(aaa|bbb)/'... or isStringVarMatching('leftmenu', '(aaa|bbb)')
|
$scheck = preg_replace('/(\^|\')\(/', '__REGEXSTART__', $scheck); // To allow preg_match('/^(aaa|bbb)/'... or isStringVarMatching('leftmenu', '(aaa|bbb)')
|
||||||
//print 'scheck='.$scheck." : ".strpos($scheck, '(')."<br>\n";
|
//print 'scheck='.$scheck." : ".strpos($scheck, '(')."<br>\n";
|
||||||
if (strpos($scheck, '(') !== false) {
|
if (strpos($scheck, '(') !== false) {
|
||||||
@@ -9725,8 +9725,8 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1'
|
|||||||
$scheck = preg_replace('/->[a-zA-Z0-9_]+\(/', '->__METHOD__', $s); // accept parenthesis in '...->method(...'
|
$scheck = preg_replace('/->[a-zA-Z0-9_]+\(/', '->__METHOD__', $s); // accept parenthesis in '...->method(...'
|
||||||
$scheck = preg_replace('/^\(/', '__PARENTHESIS__ ', $scheck); // accept parenthesis in '(...'. Must replace with __PARENTHESIS__ with a space after to allow following substitutions
|
$scheck = preg_replace('/^\(/', '__PARENTHESIS__ ', $scheck); // accept parenthesis in '(...'. Must replace with __PARENTHESIS__ with a space after to allow following substitutions
|
||||||
$scheck = preg_replace('/\s\(/', '__PARENTHESIS__ ', $scheck); // accept parenthesis in '... ('. Must replace with __PARENTHESIS__ with a space after to allow following substitutions
|
$scheck = preg_replace('/\s\(/', '__PARENTHESIS__ ', $scheck); // accept parenthesis in '... ('. Must replace with __PARENTHESIS__ with a space after to allow following substitutions
|
||||||
$scheck = preg_replace('/^!?[a-zA-Z0-9_]+\(/', '$1__FUNCTION__', $scheck); // accept parenthesis in 'function(' and '!function('
|
$scheck = preg_replace('/^!?[a-zA-Z0-9_]+\(/', '__FUNCTION__', $scheck); // accept parenthesis in 'function(' and '!function('
|
||||||
$scheck = preg_replace('/\s!?[a-zA-Z0-9_]+\(/', '$1__FUNCTION__', $scheck); // accept parenthesis in '... function(' and '... !function('
|
$scheck = preg_replace('/\s!?[a-zA-Z0-9_]+\(/', '__FUNCTION__', $scheck); // accept parenthesis in '... function(' and '... !function('
|
||||||
$scheck = preg_replace('/(\^|\')\(/', '__REGEXSTART__', $scheck); // To allow preg_match('/^(aaa|bbb)/'... or isStringVarMatching('leftmenu', '(aaa|bbb)')
|
$scheck = preg_replace('/(\^|\')\(/', '__REGEXSTART__', $scheck); // To allow preg_match('/^(aaa|bbb)/'... or isStringVarMatching('leftmenu', '(aaa|bbb)')
|
||||||
//print 'scheck='.$scheck." : ".strpos($scheck, '(')."<br>\n";
|
//print 'scheck='.$scheck." : ".strpos($scheck, '(')."<br>\n";
|
||||||
if (strpos($scheck, '(') !== false) {
|
if (strpos($scheck, '(') !== false) {
|
||||||
|
|||||||
Reference in New Issue
Block a user