mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
more code cleanup (last commit for now)
git-svn-id: http://www.observium.org/svn/observer/trunk@2520 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+2
-2
@@ -201,9 +201,9 @@ function device_by_id_cache($device_id, $refresh = '0')
|
||||
|
||||
function truncate($substring, $max = 50, $rep = '...')
|
||||
{
|
||||
if (strlen($substring) < 1){ $string = $rep; } else { $string = $substring; }
|
||||
if (strlen($substring) < 1) { $string = $rep; } else { $string = $substring; }
|
||||
$leave = $max - strlen ($rep);
|
||||
if (strlen($string) > $max){ return substr_replace($string, $rep, $leave); } else { return $string; }
|
||||
if (strlen($string) > $max) { return substr_replace($string, $rep, $leave); } else { return $string; }
|
||||
}
|
||||
|
||||
function mres($string)
|
||||
|
||||
Reference in New Issue
Block a user