diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 4bfe60814b..f95ba7cee9 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -1856,7 +1856,7 @@ $class = 'databox filters'; 'combo_server', $server_name, '', - __('Select server'), + __('Local metaconsole'), 0 ); ?> diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 3dd290e59e..8b2e6eb819 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -5092,37 +5092,13 @@ function reporting_sql($report, $content) } if ($content['treport_custom_sql_id'] != 0) { - switch ($config['dbtype']) { - case 'mysql': - $sql = io_safe_output( - db_get_value_filter( - '`sql`', - 'treport_custom_sql', - ['id' => $content['treport_custom_sql_id']] - ) - ); - break; - - case 'postgresql': - $sql = io_safe_output( - db_get_value_filter( - '"sql"', - 'treport_custom_sql', - ['id' => $content['treport_custom_sql_id']] - ) - ); - break; - - case 'oracle': - $sql = io_safe_output( - db_get_value_filter( - 'sql', - 'treport_custom_sql', - ['id' => $content['treport_custom_sql_id']] - ) - ); - break; - } + $sql = io_safe_output( + db_get_value_filter( + '`sql`', + 'treport_custom_sql', + ['id' => $content['treport_custom_sql_id']] + ) + ); } else { $sql = io_safe_output($content['external_source']); } @@ -5152,10 +5128,6 @@ function reporting_sql($report, $content) $historical_db = $content['historical_db']; } - if (is_metaconsole()) { - metaconsole_restore_db(); - } - $result = db_get_all_rows_sql($sql, $historical_db); if ($result !== false) { foreach ($result as $row) {