[Web] Show quarantine settings in /quarantine

This commit is contained in:
andryyy 2021-02-20 08:01:23 +01:00
parent 5eb2df542b
commit a95cad7133
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
3 changed files with 10 additions and 3 deletions

View File

@ -798,6 +798,7 @@
"danger": "Gefahr",
"deliver_inbox": "In Posteingang zustellen",
"disabled_by_config": "Die derzeitige Konfiguration deaktiviert die Funktion des Quarantäne-Systems. Zur Funktion muss eine Anzahl an Rückhaltungen pro Mailbox sowie ein Limit für die maximale Größe pro Element definiert werden.",
"settings_info": "Maximale Anzahl der zurückgehaltenen E-Mails: %s<br>Maximale Größe einer zu speichernden E-Mail: %s MiB",
"download_eml": "Herunterladen (.eml)",
"empty": "Keine Einträge",
"high_danger": "Hoch",

View File

@ -799,6 +799,7 @@
"danger": "Danger",
"deliver_inbox": "Deliver to inbox",
"disabled_by_config": "The current system configuration disables the quarantine functionality. Please set \"retentions per mailbox\" and a \"maximum size\" for quarantine elements.",
"settings_info": "Maximum amount of elements to be quarantined: %s<br>Maximum email size: %s MiB",
"download_eml": "Download (.eml)",
"empty": "No results",
"high_danger": "High",

View File

@ -4,7 +4,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
if (isset($_SESSION['mailcow_cc_role'])) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
$quarantine_settings = quarantine('settings');
?>
<div class="container">
<div class="row">
@ -30,11 +30,16 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
<p style="margin:10px" class="help-block"><?=$lang['quarantine']['qinfo'];?></p>
<p style="margin:10px">
<?php
if (empty(quarantine('settings')['retention_size']) || empty(quarantine('settings')['max_size'])):
if (empty($quarantine_settings['retention_size'] || $quarantine_settings['max_size'])) {
?>
<div class="panel-body"><div class="alert alert-info"><?=$lang['quarantine']['disabled_by_config'];?></div></div>
<?php
endif;
}
else {
?>
<p style="margin:10px" class="help-block"><?=sprintf($lang['quarantine']['settings_info'], $quarantine_settings['retention_size'], $quarantine_settings['max_size']);?></p>
<?php
}
?>
</p>
<div class="table-responsive">