Re-use enclosure decision logic to decide if a link gets a paperclip/lightbox popup.

This commit is contained in:
Craig Andrews 2009-09-10 21:13:30 -04:00
parent b46d2e7fe0
commit 2a56245614

View File

@ -552,12 +552,13 @@ function common_linkify($url) {
}
if (!empty($f)) {
if (isset($f->filename)) {
if ($f->isEnclosure()) {
$is_attachment = true;
$attachment_id = $f->id;
} else { // if it has OEmbed info, it's an attachment, too
} else {
$foe = File_oembed::staticGet('file_id', $f->id);
if (!empty($foe)) {
// if it has OEmbed info, it's an attachment, too
$is_attachment = true;
$attachment_id = $f->id;