2
0
forked from Wavyzz/dolibarr

Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur
2024-04-04 17:47:02 +02:00
2 changed files with 11 additions and 4 deletions

View File

@@ -11889,6 +11889,13 @@ function dolGetButtonAction($label, $text = '', $actionType = 'default', $url =
// If $url is an array, we must build a dropdown button
if (is_array($url)) {
// Loop on $url array to remove entries of disabled modules
foreach ($url as $key => $subbutton) {
if (isset($subbutton['enabled']) && empty($subbutton['enabled'])) {
unset($url[$key]);
}
}
$out = '';
if (count($url) > 1) {

View File

@@ -1462,17 +1462,17 @@ class EmailCollector extends CommonObject
$search .= ($search ? ' ' : '').$not.'CC';
}
if ($rule['type'] == 'subject') {
if (strpos($rule['rulevalue'], '!') === 0) {
if ($not) {
//$search .= ($search ? ' ' : '').'NOT BODY "'.str_replace('"', '', $rule['rulevalue']).'"';
$searchfilterexcludesubjectarray[] = preg_replace('/^!/', '', $rule['rulevalue']);
$searchfilterexcludesubjectarray[] = $rule['rulevalue'];
} else {
$search .= ($search ? ' ' : '').'SUBJECT "'.str_replace('"', '', $rule['rulevalue']).'"';
}
}
if ($rule['type'] == 'body') {
if (strpos($rule['rulevalue'], '!') === 0) {
if ($not) {
//$search .= ($search ? ' ' : '').'NOT BODY "'.str_replace('"', '', $rule['rulevalue']).'"';
$searchfilterexcludebodyarray[] = preg_replace('/^!/', '', $rule['rulevalue']);
$searchfilterexcludebodyarray[] = $rule['rulevalue'];
} else {
// Warning: Google doesn't implement IMAP properly, and only matches whole words,
$search .= ($search ? ' ' : '').'BODY "'.str_replace('"', '', $rule['rulevalue']).'"';