From eeff48ad97b42f16b80a5fb17553a409b94592c8 Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Wed, 13 Jul 2011 14:29:40 +0200 Subject: #4 import shift names --- includes/sys_template.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'includes/sys_template.php') diff --git a/includes/sys_template.php b/includes/sys_template.php index 06d5ef72..922010fd 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -15,6 +15,12 @@ function template_render($file, $data) { } } +function shorten($str) { + if (strlen($str) < 50) + return $str; + return substr($str, 0, 47) . '...'; +} + function table_body($array) { $html = ""; foreach ($array as $line) { -- cgit v1.2.3-54-g00ecf