From: Andrew Dolgov Date: Sun, 2 Feb 2014 19:17:13 +0000 (+0400) Subject: revert max ui feed title length, tweak truncate_string a bit X-Git-Tag: 1.12~57 X-Git-Url: https://git.wh0rd.org/?p=tt-rss.git;a=commitdiff_plain;h=878a0083ffc74c7753eec3a1d570af136a80529d revert max ui feed title length, tweak truncate_string a bit --- diff --git a/classes/feeds.php b/classes/feeds.php index 078ff8d6..8d4c052d 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -68,7 +68,7 @@ class Feeds extends Handler_Protected { $target = "target=\"_blank\""; $reply .= "". - truncate_string($feed_title, 20).""; + truncate_string($feed_title, 30).""; if ($error) { $error = htmlspecialchars($error); diff --git a/include/functions.php b/include/functions.php index f8c614ac..821ca83f 100644 --- a/include/functions.php +++ b/include/functions.php @@ -879,7 +879,7 @@ } function truncate_string($str, $max_len, $suffix = '…') { - 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;