--- cacti-0.8.6j/lib/rrd.php 2007-01-17 19:23:10.000000000 -0500 +++ cacti-0.8.6j-patch/lib/rrd.php 2007-02-01 20:29:59.687500000 -0500 @@ -1080,9 +1080,15 @@ if ($graph_item_types{$graph_item["graph_type_id"]} == "COMMENT") { if (read_config_option("rrdtool_version") == "rrd-1.2.x") { - $txt_graph_items .= $graph_item_types{$graph_item["graph_type_id"]} . ":\"" . str_replace(":", "\:", $graph_variables["text_format"][$graph_item_id]) . $hardreturn[$graph_item_id] . "\" "; + $comment_string = $graph_item_types{$graph_item["graph_type_id"]} . ":\"" . str_replace(":", "\:", $graph_variables["text_format"][$graph_item_id]) . $hardreturn[$graph_item_id] . "\" "; + if (trim($comment_string) != "COMMENT:\"\"") { + $txt_graph_items .= $comment_string; + } }else { - $txt_graph_items .= $graph_item_types{$graph_item["graph_type_id"]} . ":\"" . $graph_variables["text_format"][$graph_item_id] . $hardreturn[$graph_item_id] . "\" "; + $comment_string = $graph_item_types{$graph_item["graph_type_id"]} . ":\"" . $graph_variables["text_format"][$graph_item_id] . $hardreturn[$graph_item_id] . "\" "; + if (trim($comment_string) != "COMMENT:\"\"") { + $txt_graph_items .= $comment_string; + } } }elseif (($graph_item_types{$graph_item["graph_type_id"]} == "GPRINT") && (!isset($graph_data_array["graph_nolegend"]))) { $graph_variables["text_format"][$graph_item_id] = str_replace(":", "\:", $graph_variables["text_format"][$graph_item_id]); /* escape colons */