Fix user details when goto has multiple values, fix wording

This commit is contained in:
andryyy 2017-03-03 19:12:27 +01:00
parent cad084598d
commit ef7a77ef47
3 changed files with 9 additions and 6 deletions

View File

@ -1466,8 +1466,11 @@ function user_get_alias_details($username) {
} }
try { try {
$data['address'] = $username; $data['address'] = $username;
$stmt = $pdo->prepare("SELECT IFNULL(GROUP_CONCAT(`address` SEPARATOR ', '), '✘') AS `aliases` FROM `alias` WHERE `goto` = :username_goto AND `address` NOT LIKE '@%' AND `address` != :username_address"); $stmt = $pdo->prepare("SELECT IFNULL(GROUP_CONCAT(`address` SEPARATOR ', '), '✘') AS `aliases` FROM `alias`
$stmt->execute(array(':username_goto' => $username, ':username_address' => $username)); WHERE `goto` LIKE :username_goto
AND `address` NOT LIKE '@%'
AND `address` != :username_address");
$stmt->execute(array(':username_goto' => '%' . $username . '%', ':username_address' => $username));
$run = $stmt->fetchAll(PDO::FETCH_ASSOC); $run = $stmt->fetchAll(PDO::FETCH_ASSOC);
while ($row = array_shift($run)) { while ($row = array_shift($run)) {
$data['aliases'] = $row['aliases']; $data['aliases'] = $row['aliases'];
@ -1492,8 +1495,8 @@ function user_get_alias_details($username) {
while ($row = array_shift($run)) { while ($row = array_shift($run)) {
$data['aliases_send_as_all'] = $row['send_as']; $data['aliases_send_as_all'] = $row['send_as'];
} }
$stmt = $pdo->prepare("SELECT IFNULL(GROUP_CONCAT(`address` SEPARATOR ', '), '✘') as `address` FROM `alias` WHERE `goto` = :username AND `address` LIKE '@%';"); $stmt = $pdo->prepare("SELECT IFNULL(GROUP_CONCAT(`address` SEPARATOR ', '), '✘') as `address` FROM `alias` WHERE `goto` LIKE :username AND `address` LIKE '@%';");
$stmt->execute(array(':username' => $username)); $stmt->execute(array(':username' => '%' . $username . '%'));
$run = $stmt->fetchAll(PDO::FETCH_ASSOC); $run = $stmt->fetchAll(PDO::FETCH_ASSOC);
while ($row = array_shift($run)) { while ($row = array_shift($run)) {
$data['is_catch_all'] = $row['address']; $data['is_catch_all'] = $row['address'];

View File

@ -108,7 +108,7 @@ $lang['user']['alias'] = 'Alias';
$lang['user']['aliases'] = 'Aliasse'; $lang['user']['aliases'] = 'Aliasse';
$lang['user']['domain_aliases'] = 'Domain-Alias Adressen'; $lang['user']['domain_aliases'] = 'Domain-Alias Adressen';
$lang['user']['is_catch_all'] = 'Ist Catch-All Adresse für Domain(s)'; $lang['user']['is_catch_all'] = 'Ist Catch-All Adresse für Domain(s)';
$lang['user']['aliases_also_send_as'] = 'Darf außerdem versenden als'; $lang['user']['aliases_also_send_as'] = 'Darf außerdem versenden als Benutzer';
$lang['user']['aliases_send_as_all'] = 'Absender für folgende Domains und zugehörige Alias-Domains nicht prüfen'; $lang['user']['aliases_send_as_all'] = 'Absender für folgende Domains und zugehörige Alias-Domains nicht prüfen';
$lang['user']['alias_create_random'] = 'Zufälligen Alias generieren'; $lang['user']['alias_create_random'] = 'Zufälligen Alias generieren';
$lang['user']['alias_extend_all'] = 'Gültigkeit +1h'; $lang['user']['alias_extend_all'] = 'Gültigkeit +1h';

View File

@ -110,7 +110,7 @@ $lang['user']['alias'] = 'Alias';
$lang['user']['aliases'] = 'Aliases'; $lang['user']['aliases'] = 'Aliases';
$lang['user']['domain_aliases'] = 'Domain alias addresses'; $lang['user']['domain_aliases'] = 'Domain alias addresses';
$lang['user']['is_catch_all'] = 'Catch-all for domain/s'; $lang['user']['is_catch_all'] = 'Catch-all for domain/s';
$lang['user']['aliases_also_send_as'] = 'Also allowed to send as'; $lang['user']['aliases_also_send_as'] = 'Also allowed to send as user';
$lang['user']['aliases_send_as_all'] = 'Do not check sender access for the following domain(s) and its alias domains'; $lang['user']['aliases_send_as_all'] = 'Do not check sender access for the following domain(s) and its alias domains';
$lang['user']['alias_create_random'] = 'Generate random alias'; $lang['user']['alias_create_random'] = 'Generate random alias';
$lang['user']['alias_extend_all'] = 'Extend aliases by 1 hour'; $lang['user']['alias_extend_all'] = 'Extend aliases by 1 hour';