From ad9049616992f3f9f26cbb8cfe632626f0990034 Mon Sep 17 00:00:00 2001 From: andryyy Date: Thu, 20 Dec 2018 19:02:47 +0100 Subject: [PATCH] [SOGo] Add logo to config dir [Web] Add missing lang strings for transport maps --- data/conf/sogo/sogo-full.svg | 44 +++++++++++++++++++++++ data/web/inc/functions.transports.inc.php | 5 ++- data/web/lang/lang.de.php | 2 ++ data/web/lang/lang.en.php | 2 ++ 4 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 data/conf/sogo/sogo-full.svg diff --git a/data/conf/sogo/sogo-full.svg b/data/conf/sogo/sogo-full.svg new file mode 100644 index 00000000..98ff2fc3 --- /dev/null +++ b/data/conf/sogo/sogo-full.svg @@ -0,0 +1,44 @@ + + + +]> + + + diff --git a/data/web/inc/functions.transports.inc.php b/data/web/inc/functions.transports.inc.php index 4f30645f..5956868c 100644 --- a/data/web/inc/functions.transports.inc.php +++ b/data/web/inc/functions.transports.inc.php @@ -210,7 +210,7 @@ function transport($_action, $_data = null) { $transports = transport('get'); if (!empty($transports)) { foreach ($transports as $transport) { - if (transport('details', $transport['id'])['nexthop'] == $nexthop && !empty(transport('details', $transport['id'])['username'])) { + if (transport('details', $transport['id'])['nexthop'] == $nexthop && transport('details', $transport['id'])['username'] != $username) { $_SESSION['return'][] = array( 'type' => 'danger', 'log' => array(__FUNCTION__, $_action, $_data_log), @@ -274,6 +274,9 @@ function transport($_action, $_data = null) { $password = (isset($_data['password'])) ? trim($_data['password']) : $is_now['password']; $active = (isset($_data['active'])) ? intval($_data['active']) : $is_now['active_int']; } + if (empty($username)) { + $password = ''; + } else { $_SESSION['return'][] = array( 'type' => 'danger', diff --git a/data/web/lang/lang.de.php b/data/web/lang/lang.de.php index 8a763cb6..ebac29e9 100644 --- a/data/web/lang/lang.de.php +++ b/data/web/lang/lang.de.php @@ -30,6 +30,8 @@ $lang['success']['verified_yotp_login'] = "Yubico OTP Anmeldung verifiziert"; $lang['danger']['yotp_verification_failed'] = "Yubico OTP Verifizierung fehlgeschlagen: %s"; $lang['danger']['ip_list_empty'] = "Liste erlaubter IPs darf nicht leer sein"; $lang['danger']['invalid_destination'] = "Ziel-Format ist ungültig"; +$lang['danger']['invalid_nexthop'] = "Next hop ist ungültig"; +$lang['danger']['invalid_nexthop_authenticated'] = 'Dieser Next Hop existiert bereits mit abweichenden Authentifizierungsdaten. Die bestehenden Authentifizierungsdaten dieses "Next hops" müssen vorab angepasst werden.'; $lang['danger']['rspamd_ui_pw_length'] = "Rspamd UI Passwort muss mindestens 6 Zeichen lang sein"; $lang['success']['rspamd_ui_pw_set'] = "Rspamd UI Passwort wurde gesetzt"; $lang['success']['queue_command_success'] = "Queue-Aufgabe erfolgreich ausgeführt"; diff --git a/data/web/lang/lang.en.php b/data/web/lang/lang.en.php index 887385c7..bc310c33 100644 --- a/data/web/lang/lang.en.php +++ b/data/web/lang/lang.en.php @@ -31,6 +31,8 @@ $lang['success']['verified_yotp_login'] = "Verified Yubico OTP login"; $lang['danger']['yotp_verification_failed'] = "Yubico OTP verification failed: %s"; $lang['danger']['ip_list_empty'] = "List of allowed IPs cannot be empty"; $lang['danger']['invalid_destination'] = "Destination format is invalid"; +$lang['danger']['invalid_nexthop'] = "Next hop format is invalid"; +$lang['danger']['invalid_nexthop_authenticated'] = "Next hops exists with different credentials, please update the existing credentials for this next hop first."; $lang['danger']['rspamd_ui_pw_length'] = "Rspamd UI password should be at least 6 chars long"; $lang['success']['rspamd_ui_pw_set'] = "Rspamd UI password successfully set"; $lang['success']['queue_command_success'] = "Queue command completed successfully";