mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
Fixed sql error and added "no actions" text in alert module reports. Ticket #4301
(cherry picked from commit fa8f6ca37ca3a2c329fdc3b9a7cb090ed146e875)
This commit is contained in:
parent
afd773867c
commit
11dccd9054
@ -2939,7 +2939,7 @@ function reporting_alert_report_module($report, $content) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
|
$actions = array();
|
||||||
foreach ($alerts as $alert) {
|
foreach ($alerts as $alert) {
|
||||||
|
|
||||||
$data_row = array();
|
$data_row = array();
|
||||||
@ -2968,14 +2968,21 @@ function reporting_alert_report_module($report, $content) {
|
|||||||
$id_action = 0;
|
$id_action = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$actions = db_get_all_rows_sql('SELECT name
|
if ($id_action != null) {
|
||||||
FROM talert_actions
|
$actions = db_get_all_rows_sql('SELECT name
|
||||||
WHERE id = ' . $id_action);
|
FROM talert_actions
|
||||||
|
WHERE id = ' . $id_action);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$data_row['action'] = array();
|
if (empty($actions)) {
|
||||||
foreach ($actions as $action) {
|
$data_row['action'][] = __('No defined actions');
|
||||||
$data_row['action'][] = $action['name'];
|
}
|
||||||
|
else {
|
||||||
|
$data_row['action'] = array();
|
||||||
|
foreach ($actions as $action) {
|
||||||
|
$data_row['action'][] = $action['name'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$data_row['fired'] = array();
|
$data_row['fired'] = array();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user