Merge branch 'MDL-74408-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE

This commit is contained in:
Andrew Nicols
2022-07-06 11:02:41 +08:00
2 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -5883,7 +5883,7 @@ function email_should_be_diverted($email) {
return true;
}
$patterns = array_map('trim', preg_split("/[\s,]+/", $CFG->divertallemailsexcept));
$patterns = array_map('trim', preg_split("/[\s,]+/", $CFG->divertallemailsexcept, -1, PREG_SPLIT_NO_EMPTY));
foreach ($patterns as $pattern) {
if (preg_match("/$pattern/", $email)) {
return false;
+16
View File
@@ -3408,6 +3408,22 @@ EOF;
),
true,
),
'alsodivertsblankline' => array(
'divertallemailsto' => '[email protected]',
'divertallemailsexcept' => "@dev.com\n",
[
'[email protected]',
],
true,
),
'divertsexceptionblankline' => array(
'divertallemailsto' => '[email protected]',
'divertallemailsexcept' => "@example.com\n",
[
'[email protected]',
],
false,
),
);
}