mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Fix logic bugs and strip %%
This commit is contained in:
@@ -257,6 +257,7 @@ function rrdtool_lastupdate($filename, $options)
|
||||
function rrdtool_escape($string, $maxlength = NULL)
|
||||
{
|
||||
$result = shorten_interface_type($string);
|
||||
$result = str_replace('%','%%',$result);
|
||||
if ( is_numeric($maxlength) ) {
|
||||
$extra = substr_count($string,':',0,$maxlength);
|
||||
$result = substr(str_pad($result, $maxlength),0,$maxlength+$extra);
|
||||
|
||||
Reference in New Issue
Block a user