[SOGo, Dovecot] Remove unnecessary likes from sql queries
[Web] Filter transport destinations to prevent empty destinationsmaster
parent
4627331339
commit
3a9efc86cf
|
@ -35,7 +35,7 @@ SELECT
|
||||||
mailbox.username,
|
mailbox.username,
|
||||||
mailbox.domain,
|
mailbox.domain,
|
||||||
mailbox.username,
|
mailbox.username,
|
||||||
if(json_extract(attributes, '$.force_pw_update') LIKE '%0%', if(json_extract(attributes, '$.sogo_access') LIKE '%1%', password, '{SSHA256}A123A123A321A321A321B321B321B123B123B321B432F123E321123123321321'), '{SSHA256}A123A123A321A321A321B321B321B123B123B321B432F123E321123123321321'),
|
IF(JSON_UNQUOTE(JSON_VALUE(attributes, '$.force_pw_update')) = '0', IF(JSON_UNQUOTE(JSON_VALUE(attributes, '$.sogo_access')) = 1, password, '{SSHA256}A123A123A321A321A321B321B321B123B123B321B432F123E321123123321321'), '{SSHA256}A123A123A321A321A321B321B321B123B123B321B432F123E321123123321321'),
|
||||||
mailbox.name,
|
mailbox.name,
|
||||||
mailbox.username,
|
mailbox.username,
|
||||||
IFNULL(GROUP_CONCAT(ga.aliases ORDER BY ga.aliases SEPARATOR ' '), ''),
|
IFNULL(GROUP_CONCAT(ga.aliases ORDER BY ga.aliases SEPARATOR ' '), ''),
|
||||||
|
|
|
@ -245,7 +245,7 @@ function transport($_action, $_data = null) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$destinations = array_values(array_unique($destinations));
|
$destinations = array_filter(array_values(array_unique($destinations)));
|
||||||
if (empty($destinations)) { return false; }
|
if (empty($destinations)) { return false; }
|
||||||
if (isset($next_hop_matches[1])) {
|
if (isset($next_hop_matches[1])) {
|
||||||
if (in_array($next_hop_clean, $existing_nh)) {
|
if (in_array($next_hop_clean, $existing_nh)) {
|
||||||
|
|
Loading…
Reference in New Issue