From 7617330e931767fff637885853d07bfd647a1df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Mon, 17 May 2021 13:31:46 +0200 Subject: [PATCH 1/2] Added agent regex to console task template send email --- pandora_console/include/functions_cron.php | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php index aebeeb7e42..f4c7597a08 100644 --- a/pandora_console/include/functions_cron.php +++ b/pandora_console/include/functions_cron.php @@ -552,11 +552,24 @@ function cron_list_table() continue; } - $agents_id = $args[1]; - $id_group = $args[2]; + if (empty($args[0]) === false || (string) $args[1] !== '0') { + $agents_id = $args[1]; + } else { + if (empty($args[2]) === false) { + $agents_id = sprintf( + '(%s) %s', + __('regex'), + $args[2] + ); + } else { + $agents_id = __('None'); + } + } + + $id_group = $args[3]; $report_per_agent = $args[0]; - $report_name = $args[3]; - $email = $args[4]; + $report_name = $args[4]; + $email = $args[5]; $data[2] .= '
- '.__('Template').': '; $data[2] .= ''; $data[2] .= $template['name'].''; From b3aa47877d5743b3de973367ab79e7371ec21f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Fri, 11 Jun 2021 15:54:04 +0200 Subject: [PATCH 2/2] Fixed issue with meta --- pandora_console/include/functions_cron.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php index f4c7597a08..4469bb50f8 100644 --- a/pandora_console/include/functions_cron.php +++ b/pandora_console/include/functions_cron.php @@ -552,7 +552,9 @@ function cron_list_table() continue; } - if (empty($args[0]) === false || (string) $args[1] !== '0') { + hd($args, true); + hd('cron', true); + if (empty($args[1]) === false && (string) $args[1] !== '0') { $agents_id = $args[1]; } else { if (empty($args[2]) === false) { @@ -566,8 +568,7 @@ function cron_list_table() } } - $id_group = $args[3]; - $report_per_agent = $args[0]; + $report_per_agent = $args[3]; $report_name = $args[4]; $email = $args[5]; $data[2] .= '
- '.__('Template').': ';