upgrade php

This commit is contained in:
daniel 2018-10-15 09:05:04 +02:00
parent c3bcb84293
commit d28bc79b79
5 changed files with 28 additions and 46 deletions

View File

@ -78,7 +78,7 @@ else {
// Check if mysqli is available
if (!(isset($config["mysqli"]))) {
$config["mysqli"] = extension_loaded(mysqli);
$config["mysqli"] = extension_loaded('mysqli');
}
$config['start_time'] = microtime (true);

View File

@ -3113,13 +3113,8 @@ function graph_custom_sql_graph ($id, $width, $height,
}
}
}
//XXXXpie_graph
$flash_charts = $config['flash_charts'];
html_debug_print('entra');
if ($only_image) {
$flash_charts = false;
$ttl =2;
}
if($config["fixed_graph"] == false){
$water_mark = array('file' =>
@ -3898,18 +3893,14 @@ function graph_netflow_aggregate_pie ($data, $aggregate, $ttl = 1, $only_image =
$i++;
}
$flash_chart = $config['flash_charts'];
if ($only_image) {
$flash_chart = false;
}
if($config["fixed_graph"] == false){
$water_mark = array('file' =>
$config['homedir'] . "/images/logo_vertical_water.png",
'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false));
}
return pie_graph($flash_chart, $values, 370, 200,
return pie_graph(
$values, 370, 200,
__('Other'), $config['homeurl'], $water_mark,
$config['fontpath'], $config['font_size'], $ttl);
}

View File

@ -1308,7 +1308,6 @@ function reporting_event_top_n($report, $content, $type = 'dinamic',
if ($show_graph != REPORT_TOP_N_ONLY_TABLE) {
arsort($data_pie_graph);
$return['charts']['pie'] = pie_graph(
false,
$data_pie_graph,
$width, $height,
__("other"),
@ -1462,7 +1461,6 @@ function reporting_event_report_group($report, $content,
$filter_event_status, $filter_event_filter_search);
$return['chart']['by_agent']= pie_graph(
false,
$data_graph,
500,
150,
@ -1482,7 +1480,6 @@ function reporting_event_report_group($report, $content,
$filter_event_status, $filter_event_filter_search);
$return['chart']['by_user_validator'] = pie_graph(
false,
$data_graph,
500,
150,
@ -1504,7 +1501,6 @@ function reporting_event_report_group($report, $content,
$colors = get_criticity_pie_colors($data_graph);
$return['chart']['by_criticity'] = pie_graph(
false,
$data_graph,
500,
150,
@ -1526,7 +1522,6 @@ function reporting_event_report_group($report, $content,
$filter_event_status, $filter_event_filter_search);
$return['chart']['validated_vs_unvalidated'] = pie_graph(
false,
$data_graph,
500,
150,
@ -2201,7 +2196,6 @@ function reporting_exception($report, $content, $type = 'dinamic',
$return["chart"]["pie"] = pie_graph(
false,
$data_pie_graph,
600,
150,
@ -2384,7 +2378,6 @@ function reporting_event_report_agent($report, $content,
$filter_event_status, $filter_event_filter_search);
$return["chart"]["by_user_validator"] = pie_graph(
false,
$data_graph,
500,
150,
@ -2406,7 +2399,6 @@ function reporting_event_report_agent($report, $content,
$colors = get_criticity_pie_colors($data_graph);
$return["chart"]["by_criticity"] = pie_graph(
false,
$data_graph,
500,
150,
@ -2428,7 +2420,6 @@ function reporting_event_report_agent($report, $content,
$filter_event_status, $filter_event_filter_search);
$return["chart"]["validated_vs_unvalidated"] = pie_graph(
false,
$data_graph,
500,
150,
@ -6616,7 +6607,6 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0,
$filter_event_type, $filter_event_status, $filter_event_filter_search);
$event['chart']['by_user_validator'] = pie_graph(
false,
$data_graph,
500,
150,
@ -6637,7 +6627,6 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0,
$colors = get_criticity_pie_colors($data_graph);
$event['chart']['by_criticity'] = pie_graph(
false,
$data_graph,
500,
150,
@ -6658,7 +6647,6 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0,
$filter_event_type, $filter_event_status, $filter_event_filter_search);
$event['chart']['validated_vs_unvalidated'] = pie_graph(
false,
$data_graph,
500,
150,

View File

@ -113,7 +113,10 @@ function html_do_report_info($report) {
<tr>
<td><b>' . __('Report date') . ': </b></td>';
if (isset($report['period'])) {
$html .= '<td>' . date($config["date_format"], ($report['datetime'] - $report['period']));
if (is_numeric($report['datetime']) && is_numeric($report['period'])) {
$html .= '<td>' . date($config["date_format"], ($report['datetime'] - $report['period'])) . '</td>';
}
$html .= '<td></td>';
}
else {
$html .= '<td>' . __('Items period before') . ' <b>' . date($config["date_format"], $report['datetime']) . '</b></td>';

View File

@ -30,7 +30,7 @@ function pandora_session_read ($session_id) {
if (!empty($session_data))
return $session_data;
else
return false;
return '';
}
function pandora_session_write ($session_id, $data) {