mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
2012-09-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php include/functions_reporting.php: Fixed custom sql metaconsole reports. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6946 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
84c5345e2d
commit
50ae58aabd
@ -1,3 +1,9 @@
|
|||||||
|
2012-09-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
|
* include/functions_graph.php
|
||||||
|
include/functions_reporting.php: Fixed custom sql metaconsole
|
||||||
|
reports.
|
||||||
|
|
||||||
2012-09-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2012-09-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* include/functions_reporting.php
|
* include/functions_reporting.php
|
||||||
|
@ -1763,7 +1763,23 @@ function graph_custom_sql_graph ($id, $width, $height, $type = 'sql_graph_vbar',
|
|||||||
$sql = io_safe_output($sql['sql']);
|
$sql = io_safe_output($sql['sql']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (($config['metaconsole'] == 1) && defined('METACONSOLE')) {
|
||||||
|
$metaconsole_connection = enterprise_hook('metaconsole_get_connection', array($report_content['server_name']));
|
||||||
|
|
||||||
|
if ($metaconsole_connection === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (enterprise_hook('metaconsole_load_external_db', array($metaconsole_connection)) != NOERR) {
|
||||||
|
//ui_print_error_message ("Error connecting to ".$server_name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$data_result = db_get_all_rows_sql ($sql);
|
$data_result = db_get_all_rows_sql ($sql);
|
||||||
|
|
||||||
|
if (($config['metaconsole'] == 1) && defined('METACONSOLE'))
|
||||||
|
enterprise_hook('metaconsole_restore_db');
|
||||||
|
|
||||||
if ($data_result === false)
|
if ($data_result === false)
|
||||||
$data_result = array ();
|
$data_result = array ();
|
||||||
@ -1804,7 +1820,7 @@ function graph_custom_sql_graph ($id, $width, $height, $type = 'sql_graph_vbar',
|
|||||||
break;
|
break;
|
||||||
case 'sql_graph_hbar': // horizontal bar
|
case 'sql_graph_hbar': // horizontal bar
|
||||||
return hbar_graph($flash_charts, $data, $width, $height, array(),
|
return hbar_graph($flash_charts, $data, $width, $height, array(),
|
||||||
array(), "", "", $homeurl,
|
array(), "", "", true, $homeurl,
|
||||||
$water_mark,
|
$water_mark,
|
||||||
$config['fontpath'], $config['font_size'], false, $ttl);
|
$config['fontpath'], $config['font_size'], false, $ttl);
|
||||||
break;
|
break;
|
||||||
|
@ -2852,6 +2852,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||||||
case 'sql_graph_pie':
|
case 'sql_graph_pie':
|
||||||
case 'sql_graph_vbar':
|
case 'sql_graph_vbar':
|
||||||
case 'sql_graph_hbar':
|
case 'sql_graph_hbar':
|
||||||
|
|
||||||
|
if ($config['metaconsole'] == 1 && defined('METACONSOLE'))
|
||||||
|
metaconsole_restore_db();
|
||||||
|
|
||||||
reporting_header_content($mini, $content, $report, $table, __('User defined graph') . " (".__($content["type"]) .")",
|
reporting_header_content($mini, $content, $report, $table, __('User defined graph') . " (".__($content["type"]) .")",
|
||||||
"", "");
|
"", "");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user