revert max ui feed title length, tweak truncate_string a bit

This commit is contained in:
Andrew Dolgov 2014-02-02 23:17:13 +04:00
parent 66684d8149
commit 878a0083ff
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ class Feeds extends Handler_Protected {
$target = "target=\"_blank\"";
$reply .= "<a title=\"$last_updated\" $target href=\"$feed_site_url\">".
truncate_string($feed_title, 20)."</a>";
truncate_string($feed_title, 30)."</a>";
if ($error) {
$error = htmlspecialchars($error);

View File

@ -879,7 +879,7 @@
}
function truncate_string($str, $max_len, $suffix = '&hellip;') {
if (mb_strlen($str, "utf-8") > $max_len - 3) {
if (mb_strlen($str, "utf-8") > $max_len) {
return mb_substr($str, 0, $max_len, "utf-8") . $suffix;
} else {
return $str;