]> git.wh0rd.org Git - tt-rss.git/commitdiff
revert max ui feed title length, tweak truncate_string a bit
authorAndrew Dolgov <noreply@fakecake.org>
Sun, 2 Feb 2014 19:17:13 +0000 (23:17 +0400)
committerAndrew Dolgov <noreply@fakecake.org>
Sun, 2 Feb 2014 19:17:13 +0000 (23:17 +0400)
classes/feeds.php
include/functions.php

index 078ff8d6aff46b80cfd692347b1999ae2a556da1..8d4c052dc9e270063d6c001ac47804e961e1113c 100644 (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);
index f8c614ac7078a608cb13b9943a17606f917124c7..821ca83f07344a5b1211727b5f764e57f8ee9bea 100644 (file)
        }
 
        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;