Skip to content

Commit

Permalink
QA: Error correction after testing related to #5915
Browse files Browse the repository at this point in the history
* This may correct the issue with RRDtool.  Not sure yet.
  • Loading branch information
TheWitness committed Nov 13, 2024
1 parent d415de6 commit b919466
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions lib/rrd.php
Original file line number Diff line number Diff line change
Expand Up @@ -2478,7 +2478,11 @@ function rrdtool_function_graph($local_graph_id, $rra_id, $graph_data_array, $rr
if ($graph_variables['text_format'][$graph_item_id] != '') {
$text_format = rrdtool_escape_string(html_escape(str_pad($graph_variables['text_format'][$graph_item_id], $pad_number)));
} elseif (isset($graph_data_array['graph_nolegend'])) {
$text_format = $legends[$graph_item['local_data_id']][$graph_item['data_source_name']][$consolidation_functions[$graph_cf]];
if (isset($legends[$graph_item['local_data_id']][$graph_item['data_source_name']][$consolidation_functions[$graph_cf]])) {
$text_format = $legends[$graph_item['local_data_id']][$graph_item['data_source_name']][$consolidation_functions[$graph_cf]];
} else {
$text_format = '';
}
} else {
$text_format = '';
}
Expand All @@ -2501,7 +2505,11 @@ function rrdtool_function_graph($local_graph_id, $rra_id, $graph_data_array, $rr
if ($graph_variables['text_format'][$graph_item_id] != '') {
$text_format = rrdtool_escape_string(html_escape(str_pad($graph_variables['text_format'][$graph_item_id], $pad_number)));
} elseif (isset($graph_data_array['graph_nolegend'])) {
$text_format = $legends[$graph_item['local_data_id']][$graph_item['data_source_name']][$consolidation_functions[$graph_cf]];
if (isset($legends[$graph_item['local_data_id']][$graph_item['data_source_name']][$consolidation_functions[$graph_cf]])) {
$text_format = $legends[$graph_item['local_data_id']][$graph_item['data_source_name']][$consolidation_functions[$graph_cf]];
} else {
$text_format = '';
}
} else {
$text_format = '';
}
Expand All @@ -2518,7 +2526,11 @@ function rrdtool_function_graph($local_graph_id, $rra_id, $graph_data_array, $rr
if ($graph_variables['text_format'][$graph_item_id] != '') {
$text_format = rrdtool_escape_string(html_escape(str_pad($graph_variables['text_format'][$graph_item_id], $pad_number)));
} elseif (isset($graph_data_array['graph_nolegend'])) {
$text_format = $legends[$graph_item['local_data_id']][$graph_item['data_source_name']][$consolidation_functions[$graph_cf]];
if (isset($legends[$graph_item['local_data_id']][$graph_item['data_source_name']][$consolidation_functions[$graph_cf]])) {
$text_format = $legends[$graph_item['local_data_id']][$graph_item['data_source_name']][$consolidation_functions[$graph_cf]];
} else {
$text_format = '';
}
} else {
$text_format = '';
}
Expand All @@ -2534,7 +2546,11 @@ function rrdtool_function_graph($local_graph_id, $rra_id, $graph_data_array, $rr
if ($graph_variables['text_format'][$graph_item_id] != '') {
$text_format = rrdtool_escape_string(html_escape(str_pad($graph_variables['text_format'][$graph_item_id], $pad_number)));
} elseif (isset($graph_data_array['graph_nolegend'])) {
$text_format = $legends[$graph_item['local_data_id']][$graph_item['data_source_name']][$consolidation_functions[$graph_cf]];
if (isset($legends[$graph_item['local_data_id']][$graph_item['data_source_name']][$consolidation_functions[$graph_cf]])) {
$text_format = $legends[$graph_item['local_data_id']][$graph_item['data_source_name']][$consolidation_functions[$graph_cf]];
} else {
$text_format = '';
}
} else {
$text_format = '';
}
Expand Down

0 comments on commit b919466

Please sign in to comment.