[Web] Feature: Expand alias over alias domains
parent
a3c6c51b35
commit
b82bf5073b
|
@ -1935,6 +1935,23 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
|||
continue;
|
||||
}
|
||||
if ($_data['expand_alias'] === true || $_data['expand_alias'] == 1) {
|
||||
$stmt = $pdo->prepare("SELECT `address` FROM `alias`
|
||||
WHERE `address` = :address
|
||||
AND `domain` NOT IN (
|
||||
SELECT `alias_domain` FROM `alias_domain`
|
||||
)");
|
||||
$stmt->execute(array(
|
||||
':address' => $address,
|
||||
));
|
||||
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||
if ($num_results == 0) {
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'warning',
|
||||
'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
||||
'msg' => array('is_not_primary_alias', htmlspecialchars($address))
|
||||
);
|
||||
continue;
|
||||
}
|
||||
$stmt = $pdo->prepare("SELECT `goto`, GROUP_CONCAT(CONCAT(SUBSTRING(`alias`.`address`, 1, LOCATE('@', `alias`.`address`) - 1), '@', `alias_domain`.`alias_domain`)) AS `missing_alias`
|
||||
FROM `alias` JOIN `alias_domain` ON `alias_domain`.`target_domain` = `alias`.`domain`
|
||||
WHERE CONCAT(SUBSTRING(`alias`.`address`, 1, LOCATE('@', `alias`.`address`) - 1), '@', `alias_domain`.`alias_domain`) NOT IN (
|
||||
|
|
|
@ -772,7 +772,7 @@ jQuery(function($){
|
|||
{"name":"domain","title":lang.domain,"breakpoints":"xs sm"},
|
||||
{"name":"public_comment","title":lang.public_comment,"breakpoints":"all"},
|
||||
{"name":"private_comment","title":lang.private_comment,"breakpoints":"all"},
|
||||
{"name":"sogo_visible","title":lang.sogo_visible,"breakpoints":"all"},
|
||||
{"name":"sogo_visible","title":lang.sogo_visible,"formatter": function(value){return 1==value?'✓':0==value&&'✕';},"breakpoints":"all"},
|
||||
{"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'✓':0==value&&'✕';}},
|
||||
{"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"180px","width":"180px"},"type":"html","title":lang.action,"breakpoints":"xs sm"}
|
||||
],
|
||||
|
|
|
@ -1110,6 +1110,7 @@
|
|||
"fuzzy_learn_error": "Fuzzy Lernfehler: %s",
|
||||
"hash_not_found": "Hash nicht gefunden. Möglicherweise wurde dieser bereits gelöscht.",
|
||||
"ip_invalid": "Ungültige IP übersprungen: %s",
|
||||
"is_not_primary_alias": "Überspringe nicht-primären Alias %s",
|
||||
"no_active_admin": "Kann letzten aktiven Administrator nicht deaktivieren",
|
||||
"quota_exceeded_scope": "Domain-Quota erschöpft: Es können nur noch unlimiterte Mailboxen in dieser Domain erstellt werden.",
|
||||
"session_token": "Formular-Token ungültig: Token stimmt nicht überein",
|
||||
|
|
|
@ -1108,6 +1108,7 @@
|
|||
"fuzzy_learn_error": "Fuzzy hash learn error: %s",
|
||||
"hash_not_found": "Hash not found or already deleted",
|
||||
"ip_invalid": "Skipped invalid IP: %s",
|
||||
"is_not_primary_alias": "Skipped non-primary alias %s",
|
||||
"no_active_admin": "Cannot deactivate last active admin",
|
||||
"quota_exceeded_scope": "Domain quota exceeded: Only unlimited mailboxes can be created in this domain scope.",
|
||||
"session_token": "Form token invalid: Token mismatch",
|
||||
|
|
Loading…
Reference in New Issue