Merge branch 'MDL-74408-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user