From b3e977a40a1dd4c968e639c4fa6093a3f6ad2511 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 13 Jul 2015 12:42:55 +0200 Subject: [PATCH] Fixed an error related with the creation of a report after an invalid creation Ticket #2397. --- .../godmode/reporting/reporting_builder.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 13b907d621..4190689b47 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -769,16 +769,14 @@ switch ($action) { else { $resultOperationDB = false; } + + $action = 'edit'; } else if ($action == 'save') { if ($reportName != "" && $idGroupReport != "") { // This flag allow to differentiate between normal console and metaconsole reports - if (defined('METACONSOLE') and - $config['metaconsole'] == 1) - $metaconsole_report = 1; - else - $metaconsole_report = 0; + $metaconsole_report = (int) is_metaconsole(); // Juanma (07/05/2014) New feature: Custom front page for reports if ($config['custom_report_front']) { @@ -830,8 +828,9 @@ switch ($action) { $idReport = $idOrResult; $report_id_user = $config['id_user']; } + + $action = $resultOperationDB ? 'edit' : 'new'; } - $action = 'edit'; break; case 'item_editor': $resultOperationDB = null;