diff options
author | Andrew Dolgov <[email protected]> | 2013-08-05 12:26:09 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-08-05 12:26:09 +0400 |
commit | 5c54e6838870498134bbfb2994c25d2140b43bad (patch) | |
tree | 4446dfd2781656a7fd36738612557d4461c5e074 /include/functions.php | |
parent | 6bf61bdc639f60957ce4edc9e0160de3e78dc7df (diff) |
support media:description for media: enclosures
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 12 |
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 = "— " . truncate_string($entry["title"], 30); + else + $title = ""; + + $rv .= "<option value=\"".htmlspecialchars($entry["url"])."\">" . htmlspecialchars($entry["filename"]) . "$title</option>"; }; |