mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Truncate Client Name on client side nav
This commit is contained in:
@@ -192,7 +192,10 @@ function truncate($text, $chars) {
|
||||
}
|
||||
$text = $text." ";
|
||||
$text = substr($text, 0, $chars);
|
||||
$text = substr($text, 0, strrpos($text, ' '));
|
||||
$lastSpacePos = strrpos($text, ' ');
|
||||
if ($lastSpacePos !== false) {
|
||||
$text = substr($text, 0, $lastSpacePos);
|
||||
}
|
||||
return $text."...";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user