mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 00:34:46 +02:00
Merge branch 'ent-5158-Informes-SQL-en-la-meta' into 'develop'
Fixed item sql See merge request artica/pandorafms!2966
This commit is contained in:
commit
ad9879bc1e
@ -1856,7 +1856,7 @@ $class = 'databox filters';
|
||||
'combo_server',
|
||||
$server_name,
|
||||
'',
|
||||
__('Select server'),
|
||||
__('Local metaconsole'),
|
||||
0
|
||||
);
|
||||
?>
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user