1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 20:45:55 +00:00

support media:description for media: enclosures

This commit is contained in:
Andrew Dolgov
2013-08-05 12:26:09 +04:00
parent 6bf61bdc63
commit 5c54e68388
6 changed files with 29 additions and 3 deletions

View File

@@ -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>";
};