Merge branch 'ent-5511-9663-Bug-SQL-query-Metaconsola' into 'develop'

avoid trying to connect to server if server name is empty or zero

See merge request artica/pandorafms!3084
This commit is contained in:
Daniel Rodriguez 2020-03-12 16:23:44 +01:00
commit 782ebce66f
1 changed files with 2 additions and 2 deletions

View File

@ -5140,7 +5140,7 @@ function reporting_sql($report, $content)
$return['description'] = $content['description'];
$return['date'] = reporting_get_date_text();
if ($config['metaconsole']) {
if ($config['metaconsole'] && !empty($content['server_name'])) {
$id_meta = metaconsole_get_id_server(
$content['server_name']
);
@ -5212,7 +5212,7 @@ function reporting_sql($report, $content)
$return['error'] = __('Illegal query: Due security restrictions, there are some tokens or words you cannot use: *, delete, drop, alter, modify, password, pass, insert or update.');
}
if ($config['metaconsole']) {
if ($config['metaconsole'] && !empty($content['server_name'])) {
metaconsole_restore_db();
}