Merge pull request #4873 from laf/issue-4868

fix: Toner graphs with invalid chars
This commit is contained in:
Tony Murray
2016-11-01 14:19:31 -05:00
committed by GitHub
4 changed files with 18 additions and 2 deletions

View File

@@ -46,7 +46,7 @@ foreach (dbFetchRows('SELECT * FROM toner where device_id = ?', array($device['d
$hostname = gethostbyid($toner['device_id']);
$descr = substr(str_pad($toner['toner_descr'], 16), 0, 16);
$descr = safedescr(substr(str_pad($toner['toner_descr'], 16), 0, 16));
$rrd_filename = rrd_name($device['hostname'], array('toner', $toner['toner_index']));
$toner_id = $toner['toner_id'];

View File

@@ -11,7 +11,7 @@ if ($colour['left'] == null) {
$colour['left'] = 'CC0000';
}
$descr = substr(str_pad($toner['toner_descr'], 26), 0, 26);
$descr = safedescr(substr(str_pad($toner['toner_descr'], 26), 0, 26));
$background = get_percentage_colours((100 - $toner['toner_current']));