diff --git a/html/includes/graphs/XXX_device_memory_windows.inc.php b/html/includes/graphs/XXX_device_memory_windows.inc.php index 7122762dac..731250de9a 100644 --- a/html/includes/graphs/XXX_device_memory_windows.inc.php +++ b/html/includes/graphs/XXX_device_memory_windows.inc.php @@ -39,7 +39,7 @@ $rrd_options .= ' GPRINT:availreal:LAST:\ \ \ %7.2lf%sB'; $rrd_options .= ' GPRINT:availreal:AVERAGE:%7.2lf%sB'; $rrd_options .= " GPRINT:availreal:MAX:%7.2lf%sB\\\\n"; $rrd_options .= ' LINE1:usedreal#d0b080:'; -$rrd_options .= ' AREA:shared#afeced::'; +$rrd_options .= ' AREA:shared#afeced:'; $rrd_options .= ' AREA:buffered#cc0000::STACK'; $rrd_options .= ' AREA:cached#ffaa66::STACK'; $rrd_options .= ' LINE1.25:shared#008fea:shared'; diff --git a/html/includes/graphs/application/shoutcast_multi_stats.inc.php b/html/includes/graphs/application/shoutcast_multi_stats.inc.php index ea01630bf1..26b989c22a 100644 --- a/html/includes/graphs/application/shoutcast_multi_stats.inc.php +++ b/html/includes/graphs/application/shoutcast_multi_stats.inc.php @@ -53,14 +53,14 @@ else { foreach ($rrd_list as $rrd) { $colours = (isset($rrd['colour']) ? $rrd['colour'] : 'default'); $strlen = ((strlen($rrd['descr']) < $descr_len) ? ($descr_len - strlen($rrd['descr'])) : '0'); - $descr = (isset($rrd['descr']) ? rrdtool_escape($rrd['descr'], ($desc_len + $strlen)) : 'Unkown'); + $descr = (isset($rrd['descr']) ? rrdtool_escape($rrd['descr'], ($desc_len + $strlen)) : 'Unknown'); for ($z = 0; $z < $strlen; $z++) { $descr .= ' '; } if ($i) { - $stack = 'STACK'; + $stack = ':STACK'; } $colour = $config['graph_colours'][$colours][$x]; @@ -68,7 +68,7 @@ foreach ($rrd_list as $rrd) { $rrd_options .= ' DEF:peak'.$x.'='.$rrd['filename'].':peak:MAX'; $rrd_options .= ' DEF:unique'.$x.'='.$rrd['filename'].':unique:AVERAGE'; $rrd_options .= ' VDEF:avg'.$x.'=cur'.$x.',AVERAGE'; - $rrd_options .= ' AREA:cur'.$x.'#'.$colour.':"'.$descr."\":$stack"; + $rrd_options .= ' AREA:cur'.$x.'#'.$colour.":'".$descr."'$stack"; $rrd_options .= ' GPRINT:cur'.$x.':LAST:"%6.2lf"'; $rrd_options .= ' GPRINT:unique'.$x.':LAST:"%6.2lf%s"'; $rrd_options .= ' GPRINT:avg'.$x.':"%6.2lf"'; @@ -97,7 +97,7 @@ if (!$nototal) { $rrd_options .= ' CDEF:totunique=unique0'.$totunique; $rrd_options .= ' CDEF:totpeak=peak0'.$totpeak; $rrd_options .= ' VDEF:totavg=totcur,AVERAGE'; - $rrd_options .= ' LINE2:totcur#'.$colour.':"'.$descr.'"'; + $rrd_options .= ' LINE2:totcur#'.$colour.":'".$descr."'"; $rrd_options .= ' GPRINT:totcur:LAST:"%6.2lf"'; $rrd_options .= ' GPRINT:totunique:LAST:"%6.2lf%s"'; $rrd_options .= ' GPRINT:totavg:"%6.2lf"'; diff --git a/html/includes/graphs/device/mempool.inc.php b/html/includes/graphs/device/mempool.inc.php index 8c8fba6773..d574ebcf82 100644 --- a/html/includes/graphs/device/mempool.inc.php +++ b/html/includes/graphs/device/mempool.inc.php @@ -46,7 +46,7 @@ foreach (dbFetchRows('SELECT * FROM `mempools` where `device_id` = ?', array($de $rrd_optionsb .= " LINE1:mempooltotal$i#".$colour.":'".$descr."' "; $rrd_optionsb .= " GPRINT:mempooltotal$i:MIN:%3.0lf%%"; $rrd_optionsb .= " GPRINT:mempooltotal$i:LAST:%3.0lf%%"; - $rrd_optionsb .= " GPRINT:mempooltotal$i:MAX:%3.0lf%%\\\l "; + $rrd_optionsb .= " GPRINT:mempooltotal$i:MAX:%3.0lf%%\\l "; $iter++; $i++; } diff --git a/html/includes/graphs/device/smokeping_all_common_avg.inc.php b/html/includes/graphs/device/smokeping_all_common_avg.inc.php index 97c5d40fba..cd8613f1b4 100644 --- a/html/includes/graphs/device/smokeping_all_common_avg.inc.php +++ b/html/includes/graphs/device/smokeping_all_common_avg.inc.php @@ -37,6 +37,7 @@ foreach ($smokeping_files[$direction][$device['hostname']] as $source => $filena $colour = $config['graph_colours'][$colourset][$iter]; $iter++; + // FIXME: $descr unused? -- PDG 2015-11-14 $descr = rrdtool_escape($source, $descr_len); $filename = generate_smokeping_file($device,$filename); diff --git a/html/includes/graphs/device/storage.inc.php b/html/includes/graphs/device/storage.inc.php index 769e9ce913..e52e8fa655 100644 --- a/html/includes/graphs/device/storage.inc.php +++ b/html/includes/graphs/device/storage.inc.php @@ -42,6 +42,6 @@ foreach (dbFetchRows('SELECT * FROM storage where device_id = ?', array($device[ $rrd_options .= " LINE1.25:$storage[storage_id]perc#".$colour.":'$descr'"; $rrd_options .= " GPRINT:$storage[storage_id]size:LAST:%6.2lf%sB"; $rrd_options .= " GPRINT:$storage[storage_id]used:LAST:%6.2lf%sB"; - $rrd_options .= " GPRINT:$storage[storage_id]perc:LAST:%5.2lf%%\\\\l"; + $rrd_options .= " GPRINT:$storage[storage_id]perc:LAST:%5.2lf%%\\l"; $iter++; }//end foreach diff --git a/html/includes/graphs/device/ucd_load.inc.php b/html/includes/graphs/device/ucd_load.inc.php index ccdf61ee5e..1a5e5ab9af 100644 --- a/html/includes/graphs/device/ucd_load.inc.php +++ b/html/includes/graphs/device/ucd_load.inc.php @@ -14,12 +14,12 @@ $rrd_options .= ' CDEF:b=5min,100,/'; $rrd_options .= ' CDEF:c=15min,100,/'; $rrd_options .= ' CDEF:cdefd=a,b,c,+,+'; $rrd_options .= " COMMENT:'Load Average Current Average Maximum\\n'"; -$rrd_options .= " AREA:a#ffeeaa:'1 Min':"; +$rrd_options .= " AREA:a#ffeeaa:'1 Min'"; $rrd_options .= ' LINE1:a#c5aa00:'; $rrd_options .= " GPRINT:a:LAST:' %7.2lf'"; $rrd_options .= " GPRINT:a:AVERAGE:' %7.2lf'"; $rrd_options .= " GPRINT:a:MAX:' %7.2lf\\n'"; -$rrd_options .= " LINE1.25:b#ea8f00:'5 Min':"; +$rrd_options .= " LINE1.25:b#ea8f00:'5 Min'"; $rrd_options .= " GPRINT:b:LAST:' %7.2lf'"; $rrd_options .= " GPRINT:b:AVERAGE:' %7.2lf'"; $rrd_options .= " GPRINT:b:MAX:' %7.2lf\\n'"; diff --git a/html/includes/graphs/device/ucd_memory.inc.php b/html/includes/graphs/device/ucd_memory.inc.php index 606fed7175..05c0dd6850 100644 --- a/html/includes/graphs/device/ucd_memory.inc.php +++ b/html/includes/graphs/device/ucd_memory.inc.php @@ -73,7 +73,7 @@ $rrd_options .= " 'COMMENT: \\n'"; $rrd_options .= " 'LINE1:usedreal#d0b080:'"; -$rrd_options .= " 'AREA:shared#afeced::'"; +$rrd_options .= " 'AREA:shared#afeced:'"; $rrd_options .= " 'AREA:buffered#cc0000::STACK'"; $rrd_options .= " 'AREA:cached#ffaa66::STACK'"; diff --git a/html/includes/graphs/generic_data.inc.php b/html/includes/graphs/generic_data.inc.php index 63b75fde45..46560b0368 100644 --- a/html/includes/graphs/generic_data.inc.php +++ b/html/includes/graphs/generic_data.inc.php @@ -107,7 +107,7 @@ $rrd_options .= ' LINE:in'.$format."#608720:'In '"; $rrd_options .= ' GPRINT:in'.$format.':LAST:%6.2lf%s'; $rrd_options .= ' GPRINT:in'.$format.':AVERAGE:%6.2lf%s'; $rrd_options .= ' GPRINT:in'.$format.'_max:MAX:%6.2lf%s'; -$rrd_options .= " GPRINT:95thin:%6.2lf%s\\\\n"; +$rrd_options .= " GPRINT:95thin:%6.2lf%s\\n"; $rrd_options .= ' AREA:dout'.$format.'_max#E0E0FF:'; $rrd_options .= ' AREA:dout'.$format.'#8080C0:'; @@ -116,7 +116,7 @@ $rrd_options .= ' LINE:dout'.$format."#606090:'Out'"; $rrd_options .= ' GPRINT:out'.$format.':LAST:%6.2lf%s'; $rrd_options .= ' GPRINT:out'.$format.':AVERAGE:%6.2lf%s'; $rrd_options .= ' GPRINT:out'.$format.'_max:MAX:%6.2lf%s'; -$rrd_options .= " GPRINT:95thout:%6.2lf%s\\\\n"; +$rrd_options .= " GPRINT:95thout:%6.2lf%s\\n"; if ($config['rrdgraph_real_95th']) { $rrd_options .= ' HRULE:95thhigh#FF0000:"Highest"'; @@ -125,7 +125,7 @@ if ($config['rrdgraph_real_95th']) { $rrd_options .= " GPRINT:tot:'Total %6.2lf%s'"; $rrd_options .= " GPRINT:totin:'(In %6.2lf%s'"; -$rrd_options .= " GPRINT:totout:'Out %6.2lf%s)\\\\l'"; +$rrd_options .= " GPRINT:totout:'Out %6.2lf%s)\\l'"; $rrd_options .= ' LINE1:95thin#aa0000'; $rrd_options .= ' LINE1:d95thout#aa0000'; diff --git a/html/includes/graphs/generic_multi.inc.php b/html/includes/graphs/generic_multi.inc.php index d02e82ebb0..6d7f78a1c0 100644 --- a/html/includes/graphs/generic_multi.inc.php +++ b/html/includes/graphs/generic_multi.inc.php @@ -11,7 +11,7 @@ else { } if ($nototal) { - $descrlen += '2'; + $descr_len += '2'; $unitlen += '2'; } @@ -57,16 +57,16 @@ foreach ($rrd_list as $rrd) { if ($rrd['invert']) { $rrd_options .= ' CDEF:'.$id.'i='.$id.',-1,*'; - $rrd_optionsc .= ' AREA:'.$id.'i#'.$colour.":'$descr':".$cstack; + $rrd_optionsc .= ' AREA:'.$id.'i#'.$colour.":'$descr'".$cstack; $rrd_optionsc .= ' GPRINT:'.$id.':LAST:%5.1lf%s GPRINT:'.$id.'min:MIN:%5.1lf%s'; $rrd_optionsc .= ' GPRINT:'.$id.'max:MAX:%5.1lf%s GPRINT:'.$id.":AVERAGE:'%5.1lf%s\\n'"; - $cstack = 'STACK'; + $cstack = ':STACK'; } else { - $rrd_optionsb .= ' AREA:'.$id.'#'.$colour.":'$descr':".$bstack; + $rrd_optionsb .= ' AREA:'.$id.'#'.$colour.":'$descr'".$bstack; $rrd_optionsb .= ' GPRINT:'.$id.':LAST:%5.1lf%s GPRINT:'.$id.'min:MIN:%5.1lf%s'; $rrd_optionsb .= ' GPRINT:'.$id.'max:MAX:%5.1lf%s GPRINT:'.$id.":AVERAGE:'%5.1lf%s\\n'"; - $bstack = 'STACK'; + $bstack = ':STACK'; } $i++; diff --git a/html/includes/graphs/generic_multi_bits_separated.inc.php b/html/includes/graphs/generic_multi_bits_separated.inc.php index 181f0ae4d7..88bbdec991 100644 --- a/html/includes/graphs/generic_multi_bits_separated.inc.php +++ b/html/includes/graphs/generic_multi_bits_separated.inc.php @@ -49,9 +49,6 @@ foreach ($rrd_list as $rrd) { } $descr_out = rrdtool_escape($rrd['descr_out'], $descr_len).' Out'; - $descr = str_replace("'", '', $descr); - // FIXME does this mean ' should be filtered in rrdtool_escape? probably... - $descr_out = str_replace("'", '', $descr_out); } $rrd_options .= ' DEF:'.$in.$i.'='.$rrd['filename'].':'.$ds_in.':AVERAGE '; @@ -68,10 +65,10 @@ foreach ($rrd_list as $rrd) { } if ($i) { - $stack = 'STACK'; + $stack = ':STACK'; } - $rrd_options .= ' AREA:inB'.$i.'#'.$colour_in.":'".$descr."':$stack"; + $rrd_options .= ' AREA:inB'.$i.'#'.$colour_in.":'".$descr."'$stack"; if (!$nodetails) { $rrd_options .= ' GPRINT:inB'.$i.":LAST:%6.2lf%s$units"; $rrd_options .= ' GPRINT:inB'.$i.":AVERAGE:%6.2lf%s$units"; @@ -84,7 +81,7 @@ foreach ($rrd_list as $rrd) { } $rrd_options .= " 'HRULE:0#".$colour_out.':'.$descr_out."'"; - $rrd_optionsb .= " 'AREA:outB".$i.'_neg#'.$colour_out."::$stack'"; + $rrd_optionsb .= " 'AREA:outB".$i.'_neg#'.$colour_out.":$stack'"; if (!$nodetails) { $rrd_options .= ' GPRINT:outB'.$i.":LAST:%6.2lf%s$units"; diff --git a/html/includes/graphs/generic_multi_data_separated.inc.php b/html/includes/graphs/generic_multi_data_separated.inc.php index e73ac4e85c..07caefd378 100644 --- a/html/includes/graphs/generic_multi_data_separated.inc.php +++ b/html/includes/graphs/generic_multi_data_separated.inc.php @@ -45,9 +45,6 @@ foreach ($rrd_list as $rrd) { } $descr_out = rrdtool_escape($rrd['descr_out'], $descr_len).' Out'; - $descr = str_replace("'", '', $descr); - // FIXME does this mean ' should be filtered in rrdtool_escape? probably... - $descr_out = str_replace("'", '', $descr_out); $rrd_options .= ' DEF:'.$in.$i.'='.$rrd['filename'].':'.$ds_in.':AVERAGE '; $rrd_options .= ' DEF:'.$out.$i.'='.$rrd['filename'].':'.$ds_out.':AVERAGE '; @@ -69,10 +66,10 @@ foreach ($rrd_list as $rrd) { } if ($i) { - $stack = 'STACK'; + $stack = ':STACK'; } - $rrd_options .= ' AREA:inB'.$i.'#'.$colour_in.":'".$descr."':$stack"; + $rrd_options .= ' AREA:inB'.$i.'#'.$colour_in.":'".$descr."'$stack"; $rrd_options .= ' GPRINT:inB'.$i.":LAST:%6.2lf%s$units"; $rrd_options .= ' GPRINT:inB'.$i.":AVERAGE:%6.2lf%s$units"; $rrd_options .= ' GPRINT:inB'.$i.":MAX:%6.2lf%s$units\l"; @@ -82,7 +79,7 @@ foreach ($rrd_list as $rrd) { } $rrd_options .= " 'HRULE:0#".$colour_out.':'.$descr_out."'"; - $rrd_optionsb .= " 'AREA:outB".$i.'_neg#'.$colour_out."::$stack'"; + $rrd_optionsb .= " 'AREA:outB".$i.'_neg#'.$colour_out.":$stack'"; $rrd_options .= ' GPRINT:outB'.$i.":LAST:%6.2lf%s$units"; $rrd_options .= ' GPRINT:outB'.$i.":AVERAGE:%6.2lf%s$units"; $rrd_options .= ' GPRINT:outB'.$i.":MAX:%6.2lf%s$units\l"; @@ -117,7 +114,7 @@ if (!$nototal) { $rrd_options .= ' VDEF:totout=outoctets,TOTAL'; $rrd_options .= ' VDEF:tot=octets,TOTAL'; - // $rrd_options .= " AREA:totin#" . $colour_in . ":'" . $descr . "':$stack"; + // $rrd_options .= " AREA:totin#" . $colour_in . ":'" . $descr . "'$stack"; // $rrd_options .= " GPRINT:totin:LAST:%6.2lf%s$units"; // $rrd_options .= " GPRINT:totin:AVERAGE:%6.2lf%s$units"; // $rrd_options .= " GPRINT:totin:MAX:%6.2lf%s$units\l"; diff --git a/html/includes/graphs/generic_multi_line.inc.php b/html/includes/graphs/generic_multi_line.inc.php index c34d78e77e..513b23674c 100644 --- a/html/includes/graphs/generic_multi_line.inc.php +++ b/html/includes/graphs/generic_multi_line.inc.php @@ -11,7 +11,7 @@ else { } if ($nototal) { - $descrlen += '2'; + $descr_len += '2'; $unitlen += '2'; } diff --git a/html/includes/graphs/generic_multi_seperated.inc.php b/html/includes/graphs/generic_multi_seperated.inc.php index 8549b3b333..e45752d405 100644 --- a/html/includes/graphs/generic_multi_seperated.inc.php +++ b/html/includes/graphs/generic_multi_seperated.inc.php @@ -71,7 +71,7 @@ foreach ($rrd_list as $rrd) { } if ($i) { - $stack = 'STACK'; + $stack = ':STACK'; } $rrd_options .= ' AREA:inbits'.$i.'#'.$colour_in.":'".rrdtool_escape($rrd['descr'], 9)."In '$stack"; @@ -84,7 +84,7 @@ foreach ($rrd_list as $rrd) { } $rrd_options .= " COMMENT:'\\n'"; - $rrd_optionsb .= ' AREA:outbits'.$i.'_neg#'.$colour_out.":$stack"; + $rrd_optionsb .= ' AREA:outbits'.$i.'_neg#'.$colour_out."$stack"; $rrd_options .= ' HRULE:999999999999999#'.$colour_out.":'".str_pad('', 10)."Out'"; $rrd_options .= ' GPRINT:outbits'.$i.':LAST:%6.2lf%s'; $rrd_options .= ' GPRINT:outbits'.$i.':AVERAGE:%6.2lf%s'; diff --git a/html/includes/graphs/generic_multi_simplex_seperated.inc.php b/html/includes/graphs/generic_multi_simplex_seperated.inc.php index 18df802aeb..6125cb807e 100644 --- a/html/includes/graphs/generic_multi_simplex_seperated.inc.php +++ b/html/includes/graphs/generic_multi_simplex_seperated.inc.php @@ -12,7 +12,7 @@ else { } if ($nototal) { - $descrlen += '2'; + $descr_len += '2'; $unitlen += '2'; } @@ -32,7 +32,7 @@ else { $unitlen = '10'; if ($nototal) { - $descrlen += '2'; + $descr_len += '2'; $unitlen += '2'; } @@ -81,7 +81,7 @@ foreach ($rrd_list as $i => $rrd) { // This this not the first entry? if ($i) { - $stack = 'STACK'; + $stack = ':STACK'; } // if we've been passed a multiplier we must make a CDEF based on it! @@ -109,13 +109,13 @@ foreach ($rrd_list as $i => $rrd) { $t_defname = $g_defname; } - $rrd_options .= ' AREA:'.$g_defname.$i.'#'.$colour.":'".$descr."':$stack"; + $rrd_options .= ' AREA:'.$g_defname.$i.'#'.$colour.":'".$descr."'$stack"; $rrd_options .= ' GPRINT:'.$t_defname.$i.':LAST:%5.2lf%s GPRINT:'.$t_defname.$i.'min:MIN:%5.2lf%s'; $rrd_options .= ' GPRINT:'.$t_defname.$i.'max:MAX:%5.2lf%s GPRINT:'.$t_defname.$i.":AVERAGE:'%5.2lf%s\\n'"; if (!$nototal) { - $rrd_options .= ' GPRINT:tot'.$rrd['ds'].$i.':%6.2lf%s'.rrdtool_escape($total_units).''; + $rrd_options .= ' GPRINT:tot'.$rrd['ds'].$i.":%6.2lf%s'".rrdtool_escape($total_units)."'"; } $rrd_options .= " COMMENT:'\\n'"; diff --git a/html/includes/graphs/munin/graph.inc.php b/html/includes/graphs/munin/graph.inc.php index 9b634813ba..cae85137ff 100644 --- a/html/includes/graphs/munin/graph.inc.php +++ b/html/includes/graphs/munin/graph.inc.php @@ -50,7 +50,7 @@ foreach ($dbq as $ds) { $descr = rrdtool_escape($ds['ds_label'], $descr_len); - $cmd_graph .= ' '.$ds['ds_draw'].':'.$ds_name.'#'.$colour.':"'.$descr.'"'; + $cmd_graph .= ' '.$ds['ds_draw'].':'.$ds_name.'#'.$colour.":'".$descr."'"; $cmd_graph .= ' GPRINT:'.$ds_name.':LAST:"%6.2lf%s"'; $cmd_graph .= ' GPRINT:'.$ds_name.':AVERAGE:"%6.2lf%s"'; $cmd_graph .= ' GPRINT:'.$ds_name.':MAX:"%6.2lf%s\\n"'; diff --git a/html/includes/graphs/old_generic_simplex.inc.php b/html/includes/graphs/old_generic_simplex.inc.php index 24a93147c0..91cd0612e4 100644 --- a/html/includes/graphs/old_generic_simplex.inc.php +++ b/html/includes/graphs/old_generic_simplex.inc.php @@ -20,7 +20,7 @@ else { } if ($print_total) { - $rrd_options .= ' VDEF:'.$ds.'_total=ds,TOTAL'; + $rrd_options .= ' VDEF:'.$ds.'_total='.$ds.',TOTAL'; } if ($percentile) { @@ -43,7 +43,7 @@ if ($_GET['previous'] == 'yes') { } if ($print_total) { - $rrd_options .= ' VDEF:'.$ds.'_totalX=ds,TOTAL'; + $rrd_options .= ' VDEF:'.$ds.'_totalX='.$ds.',TOTAL'; } if ($percentile) { @@ -74,11 +74,11 @@ if ($percentile) { $rrd_options .= ' GPRINT:'.$ds.'_percentile:%6.2lf%s'; } -$rrd_options .= "\\\\n"; -$rrd_options .= " COMMENT:\\\\n"; +$rrd_options .= "\\n"; +$rrd_options .= " COMMENT:\\n"; if ($print_total) { - $rrd_options .= ' GPRINT:'.$ds.'_tot:Total\ %6.2lf%s\)\\\\l'; + $rrd_options .= ' GPRINT:'.$ds.'_total:Total" %6.2lf%s"\\l'; } if ($percentile) { @@ -86,6 +86,6 @@ if ($percentile) { } if ($_GET['previous'] == 'yes') { - $rrd_options .= ' LINE1.25:'.$ds."X#666666:'Prev \\\\n'"; + $rrd_options .= ' LINE1.25:'.$ds."X#666666:'Prev \\n'"; $rrd_options .= ' AREA:'.$ds.'X#99999966:'; } diff --git a/html/includes/graphs/processor/usage.inc.php b/html/includes/graphs/processor/usage.inc.php index 5954685d77..53db2c490b 100644 --- a/html/includes/graphs/processor/usage.inc.php +++ b/html/includes/graphs/processor/usage.inc.php @@ -5,6 +5,7 @@ $scale_max = '100'; $ds = 'usage'; +// FIXME: As far as I can tell, $descr is never mentioned in includes/graphs/generic_simplex.inc.php -- PDG 2015-11-14 $descr = rrdtool_escape(short_hrDeviceDescr($proc['processor_descr']), 28); $colour_line = 'cc0000'; diff --git a/html/includes/graphs/sensor/temperature.inc.php b/html/includes/graphs/sensor/temperature.inc.php index c8ffb312de..05f7ed0ef5 100644 --- a/html/includes/graphs/sensor/temperature.inc.php +++ b/html/includes/graphs/sensor/temperature.inc.php @@ -19,7 +19,7 @@ $rrd_options .= ' AREA:sensor_diff#c5c5c5::STACK'; $rrd_options .= " LINE1.5:sensor#cc0000:'".rrdtool_escape($sensor['sensor_descr'], 21)."'"; $rrd_options .= ' GPRINT:sensor_min:MIN:%4.1lfC'; $rrd_options .= ' GPRINT:sensor:LAST:%4.1lfC'; -$rrd_options .= ' GPRINT:sensor_max:MAX:%4.1lfC\\\\l'; +$rrd_options .= ' GPRINT:sensor_max:MAX:%4.1lfC\\l'; if (is_numeric($sensor['sensor_limit'])) { $rrd_options .= ' HRULE:'.$sensor['sensor_limit'].'#999999::dashes'; diff --git a/includes/rrdtool.inc.php b/includes/rrdtool.inc.php index b71eee7a08..3c35cec224 100644 --- a/includes/rrdtool.inc.php +++ b/includes/rrdtool.inc.php @@ -280,7 +280,8 @@ function rrdtool_lastupdate($filename, $options){ function rrdtool_escape($string, $maxlength=null){ $result = shorten_interface_type($string); - $result = str_replace('%', '%%', $result); + $result = str_replace("'", '', $result); # remove quotes + $result = str_replace('%', '%%', $result); # double percent signs if (is_numeric($maxlength)) { $extra = substr_count($string, ':', 0, $maxlength); $result = substr(str_pad($result, $maxlength), 0, ($maxlength + $extra)); @@ -289,7 +290,7 @@ function rrdtool_escape($string, $maxlength=null){ } } - $result = str_replace(':', '\:', $result); + $result = str_replace(':', '\:', $result); # escape colons return $result.' '; }