diff --git a/data/web/inc/functions.mailbox.inc.php b/data/web/inc/functions.mailbox.inc.php index 3001025e..6f4f9d06 100644 --- a/data/web/inc/functions.mailbox.inc.php +++ b/data/web/inc/functions.mailbox.inc.php @@ -777,10 +777,11 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { ':active' => $active )); } + $id = $pdo->lastInsertId(); $_SESSION['return'][] = array( 'type' => 'success', 'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr), - 'msg' => array('alias_added', $address) + 'msg' => array('alias_added', $address, $id) ); } break; @@ -3119,9 +3120,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { `created`, `modified` FROM `alias` - WHERE `id` = :id AND `address` != `goto`"); + WHERE (`id` = :id OR `address` = :address) AND `address` != `goto`"); $stmt->execute(array( - ':id' => intval($_data), + ':id' => $_data, + ':address' => $_data, )); $row = $stmt->fetch(PDO::FETCH_ASSOC); $stmt = $pdo->prepare("SELECT `target_domain` FROM `alias_domain` WHERE `alias_domain` = :domain"); @@ -3823,7 +3825,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { } $stmt = $pdo->prepare("DELETE FROM `alias` WHERE `id` = :id"); $stmt->execute(array( - ':id' => $id + ':id' => $alias_data['id'] )); $stmt = $pdo->prepare("DELETE FROM `sender_acl` WHERE `send_as` = :alias_address"); $stmt->execute(array( diff --git a/data/web/lang/lang.cs.json b/data/web/lang/lang.cs.json index 84ea43d6..e39b9869 100644 --- a/data/web/lang/lang.cs.json +++ b/data/web/lang/lang.cs.json @@ -695,7 +695,7 @@ "admin_api_modified": "Změna API uložena", "admin_modified": "Změny správce uloženy", "admin_removed": "Správce %s odebrán", - "alias_added": "Byl přidán alias %s", + "alias_added": "Byl přidán alias %s (%d)", "alias_domain_removed": "Doménový alias %s odebrán", "alias_modified": "Změny aliasu %s uloženy", "alias_removed": "Alias %s odebrán", diff --git a/data/web/lang/lang.de.json b/data/web/lang/lang.de.json index e3374498..f9bf6d13 100644 --- a/data/web/lang/lang.de.json +++ b/data/web/lang/lang.de.json @@ -779,7 +779,7 @@ "admin_api_modified": "Änderungen an API wurden gespeichert", "admin_modified": "Änderungen am Administrator wurden gespeichert", "admin_removed": "Administrator %s wurde entfernt", - "alias_added": "Alias-Adresse %s wurden angelegt", + "alias_added": "Alias-Adresse %s (%d) wurde angelegt", "alias_domain_removed": "Alias-Domain %s wurde entfernt", "alias_modified": "Änderungen an Alias %s wurden gespeichert", "alias_removed": "Alias-Adresse %s wurde entfernt", diff --git a/data/web/lang/lang.en.json b/data/web/lang/lang.en.json index bad32d13..74469f18 100644 --- a/data/web/lang/lang.en.json +++ b/data/web/lang/lang.en.json @@ -778,7 +778,7 @@ "admin_api_modified": "Changes to API have been saved", "admin_modified": "Changes to administrator have been saved", "admin_removed": "Administrator %s has been removed", - "alias_added": "Alias address %s has been added", + "alias_added": "Alias address %s (%d) has been added", "alias_domain_removed": "Alias domain %s has been removed", "alias_modified": "Changes to alias address %s have been saved", "alias_removed": "Alias %s has been removed", diff --git a/data/web/lang/lang.fi.json b/data/web/lang/lang.fi.json index af156e10..63984a28 100644 --- a/data/web/lang/lang.fi.json +++ b/data/web/lang/lang.fi.json @@ -696,7 +696,7 @@ "admin_api_modified": "API-muutokset on tallennettu", "admin_modified": "Järjestelmänvalvojan muutokset on tallennettu", "admin_removed": "Ylläpitäjä %s on poistettu", - "alias_added": "Alias osoite %s on lisätty", + "alias_added": "Alias osoite %s (%d) on lisätty", "alias_domain_removed": "Alias verkkotunnus %s on poistettu", "alias_modified": "Muutokset alias osoitteseen %s on tallennettu", "alias_removed": "Alias %s on poistettu", diff --git a/data/web/lang/lang.nl.json b/data/web/lang/lang.nl.json index 6527505c..be61f714 100644 --- a/data/web/lang/lang.nl.json +++ b/data/web/lang/lang.nl.json @@ -774,7 +774,7 @@ "admin_api_modified": "Wijzigingen aan de API zijn opgeslagen", "admin_modified": "Wijzigingen aan administrator zijn opgeslagen", "admin_removed": "Administrator %s is verwijderd", - "alias_added": "Aliasadres %s is toegevoegd", + "alias_added": "Aliasadres %s (%d) is toegevoegd", "alias_domain_removed": "Aliasdomein %s is verwijderd", "alias_modified": "Wijzigingen aan alias %s zijn opgeslagen", "alias_removed": "Alias %s is verwijderd", diff --git a/data/web/lang/lang.ru.json b/data/web/lang/lang.ru.json index bac1b7f8..d7187cc1 100644 --- a/data/web/lang/lang.ru.json +++ b/data/web/lang/lang.ru.json @@ -780,7 +780,7 @@ "admin_api_modified": "Изменения в API сохранены", "admin_modified": "Изменения администратора сохранены", "admin_removed": "Администратор %s удален", - "alias_added": "Псевдоним %s добавлен", + "alias_added": "Псевдоним %s (%d) добавлен", "alias_domain_removed": "Псевдоним домена %s удален", "alias_modified": "Изменения псевдонима %s сохранены", "alias_removed": "Псевдоним %s удален", diff --git a/data/web/lang/lang.sk.json b/data/web/lang/lang.sk.json index fbe3512a..4ea772bb 100644 --- a/data/web/lang/lang.sk.json +++ b/data/web/lang/lang.sk.json @@ -771,7 +771,7 @@ "admin_api_modified": "Zmeny v API uložené", "admin_modified": "Zmeny v administrácii uložené", "admin_removed": "Administrátor %s odstránený ", - "alias_added": "Alias adresa %s pridaná", + "alias_added": "Alias adresa %s (%d) pridaná", "alias_domain_removed": "Alias doména %s odstránená ", "alias_modified": "Zmeny v alias adrese %s uložené", "alias_removed": "Alias %s odstránený", diff --git a/data/web/lang/lang.sv.json b/data/web/lang/lang.sv.json index 62b3dd70..e2d71cc2 100644 --- a/data/web/lang/lang.sv.json +++ b/data/web/lang/lang.sv.json @@ -778,7 +778,7 @@ "admin_api_modified": "Ändringarna på API:et har sparats", "admin_modified": "Ändringarna för administratören har sparats", "admin_removed": "Administratören %s har tagits bort", - "alias_added": "Aliasadressen %s har lagts till", + "alias_added": "Aliasadressen %s (%d) har lagts till", "alias_domain_removed": "Aliasdomänen %s har tagits bort", "alias_modified": "Ändringarna på aliasadressen %s har sparats", "alias_removed": "Aliasadressen %s har tagits bort",