diff --git a/backend.php b/backend.php index 0ee60a3f8..1ff981ace 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 e479c28b7..817e6d71c 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; + } + } ?>