mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Fixed item sql
This commit is contained in:
parent
24838cad0f
commit
8bde504fc2
@ -1856,7 +1856,7 @@ $class = 'databox filters';
|
|||||||
'combo_server',
|
'combo_server',
|
||||||
$server_name,
|
$server_name,
|
||||||
'',
|
'',
|
||||||
__('Select server'),
|
__('Local metaconsole'),
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
@ -5092,37 +5092,13 @@ function reporting_sql($report, $content)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($content['treport_custom_sql_id'] != 0) {
|
if ($content['treport_custom_sql_id'] != 0) {
|
||||||
switch ($config['dbtype']) {
|
$sql = io_safe_output(
|
||||||
case 'mysql':
|
db_get_value_filter(
|
||||||
$sql = io_safe_output(
|
'`sql`',
|
||||||
db_get_value_filter(
|
'treport_custom_sql',
|
||||||
'`sql`',
|
['id' => $content['treport_custom_sql_id']]
|
||||||
'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;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$sql = io_safe_output($content['external_source']);
|
$sql = io_safe_output($content['external_source']);
|
||||||
}
|
}
|
||||||
@ -5152,10 +5128,6 @@ function reporting_sql($report, $content)
|
|||||||
$historical_db = $content['historical_db'];
|
$historical_db = $content['historical_db'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_metaconsole()) {
|
|
||||||
metaconsole_restore_db();
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = db_get_all_rows_sql($sql, $historical_db);
|
$result = db_get_all_rows_sql($sql, $historical_db);
|
||||||
if ($result !== false) {
|
if ($result !== false) {
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user