[Web] Merge same notification types
This commit is contained in:
@@ -42,8 +42,11 @@ $(document).ready(function() {
|
||||
$alertbox_log_parser = alertbox_log_parser($_SESSION);
|
||||
if (is_array($alertbox_log_parser)) {
|
||||
foreach($alertbox_log_parser as $log) {
|
||||
$alerts[$log['type']][] = $log['msg'];
|
||||
}
|
||||
foreach($alerts as $alert_type => $alert_msg) {
|
||||
?>
|
||||
mailcow_alert_box(<?=$log['msg'];?>, <?=$log['type'];?>);
|
||||
mailcow_alert_box(<?=json_encode(implode('<hr class="alert-hr">', $alert_msg));?>, <?=$alert_type;?>);
|
||||
<?php
|
||||
}
|
||||
unset($_SESSION['return']);
|
||||
|
@@ -436,7 +436,7 @@ function alertbox_log_parser($_data){
|
||||
else {
|
||||
$msg = $return['msg'];
|
||||
}
|
||||
$log_array[] = array('msg' => json_encode($msg), 'type' => json_encode($type));
|
||||
$log_array[] = array('msg' => $msg, 'type' => json_encode($type));
|
||||
}
|
||||
if (!empty($log_array)) {
|
||||
return $log_array;
|
||||
|
Reference in New Issue
Block a user