From: Andrew Dolgov Date: Tue, 17 Jan 2017 11:04:00 +0000 (+0300) Subject: tweak the enclosure dropdown display a little bit for less-readable urls X-Git-Tag: 17.1~16 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c606bd5741c47e02f2c9157032ac7adcce22bdca;p=tt-rss.git tweak the enclosure dropdown display a little bit for less-readable urls --- diff --git a/include/functions2.php b/include/functions2.php index 6b6f5aa5..4535e626 100644 --- a/include/functions2.php +++ b/include/functions2.php @@ -1944,7 +1944,8 @@ if (!$ctype) $ctype = __("unknown type"); - $filename = substr($url, strrpos($url, "/")+1); + //$filename = substr($url, strrpos($url, "/")+1); + $filename = basename($url); $player = format_inline_player($url, $ctype); @@ -2025,12 +2026,17 @@ foreach ($entries as $entry) { if ($entry["title"]) - $title = "— " . truncate_string($entry["title"], 30); + $title = " — " . truncate_string($entry["title"], 30); else $title = ""; + if ($entry["filename"]) + $filename = truncate_middle(htmlspecialchars($entry["filename"]), 60); + else + $filename = ""; + $rv .= "
".htmlspecialchars($entry["filename"])."$title
"; + dojoType=\"dijit.MenuItem\">".$filename . $title.""; };