summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-01-17 14:04:00 +0300
committerAndrew Dolgov <[email protected]>2017-01-17 14:04:00 +0300
commitc606bd5741c47e02f2c9157032ac7adcce22bdca (patch)
tree4d1f72b2bf40faf42cea600d607cdaf2daec288e /include
parentdb92edd1aa0ff3777a4a8b192c8566f89db385d7 (diff)
tweak the enclosure dropdown display a little bit for less-readable urls
Diffstat (limited to 'include')
-rw-r--r--include/functions2.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/functions2.php b/include/functions2.php
index 6b6f5aa56..4535e6267 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 = "&mdash; " . truncate_string($entry["title"], 30);
+ $title = " &mdash; " . truncate_string($entry["title"], 30);
else
$title = "";
+ if ($entry["filename"])
+ $filename = truncate_middle(htmlspecialchars($entry["filename"]), 60);
+ else
+ $filename = "";
+
$rv .= "<div onclick='window.open(\"".htmlspecialchars($entry["url"])."\")'
- dojoType=\"dijit.MenuItem\">".htmlspecialchars($entry["filename"])."$title</div>";
+ dojoType=\"dijit.MenuItem\">".$filename . $title."</div>";
};