summaryrefslogtreecommitdiff
path: root/include/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions.php')
-rw-r--r--include/functions.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php
index 56361472e..6bc52e9d9 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -3776,6 +3776,7 @@
$url = $line["content_url"];
$ctype = $line["content_type"];
+ $title = $line["title"];
if (!$ctype) $ctype = __("unknown type");
@@ -3798,6 +3799,7 @@
$entry["type"] = $ctype;
$entry["filename"] = $filename;
$entry["url"] = $url;
+ $entry["title"] = $title;
array_push($entries, $entry);
}
@@ -3819,7 +3821,10 @@
$rv .= "<p><a target=\"_blank\"
href=\"".htmlspecialchars($entry["url"])."\"
>" .htmlspecialchars($entry["url"]) . "</a></p>";
+ }
+ if ($entry['title']) {
+ $rv.= "<div class=\"enclosure_title\">${entry['title']}</div>";
}
}
}
@@ -3836,7 +3841,12 @@
"<option value=''>" . __('Attachments')."</option>";
foreach ($entries as $entry) {
- $rv .= "<option value=\"".htmlspecialchars($entry["url"])."\">" . htmlspecialchars($entry["filename"]) . "</option>";
+ if ($entry["title"])
+ $title = "&mdash; " . truncate_string($entry["title"], 30);
+ else
+ $title = "";
+
+ $rv .= "<option value=\"".htmlspecialchars($entry["url"])."\">" . htmlspecialchars($entry["filename"]) . "$title</option>";
};