diff --git a/backend.php b/backend.php index 0ee60a3f..1ff981ac 100644 --- a/backend.php +++ b/backend.php @@ -1165,8 +1165,8 @@ print "
- | Select | ++ | Select | Title | @@ -1185,9 +1185,6 @@ | Purge Days | -- Last updated - | "; + + $edit_title = truncate_string($edit_title, 40); + $edit_link = truncate_string($edit_link, 60); print " | " . $edit_title . " | "; @@ -1257,7 +1257,10 @@ print ""; - + + $edit_title = truncate_string($edit_title, 40); + $edit_link = truncate_string($edit_link, 60); + print " | $edit_title | "; print "$edit_link | "; @@ -1320,9 +1323,9 @@ } - if (!$line["last_updated"]) $line["last_updated"] = "Never"; +/* if (!$line["last_updated"]) $line["last_updated"] = "Never"; - print "" . $line["last_updated"] . " | "; + print "" . $line["last_updated"] . " | "; */ print ""; diff --git a/functions.php b/functions.php index e479c28b..817e6d71 100644 --- a/functions.php +++ b/functions.php @@ -701,4 +701,12 @@ initialize_user_prefs($link, 1); } } + + function truncate_string($str, $max_len) { + if (strlen($str) > $max_len) { + return substr($str, 0, $max_len) . "..."; + } else { + return $str; + } + } ?>