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:
Tom Laermans
2011-09-20 14:37:54 +00:00
parent f87ed09e1b
commit 9a1bee1458
71 changed files with 296 additions and 293 deletions
+2 -2
View File
@@ -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)