From 2a56245614f90221946ab918e820f6546133a212 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Thu, 10 Sep 2009 21:13:30 -0400 Subject: Re-use enclosure decision logic to decide if a link gets a paperclip/lightbox popup. --- lib/util.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/util.php b/lib/util.php index 256acf199..292045928 100644 --- a/lib/util.php +++ b/lib/util.php @@ -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; -- cgit v1.2.3-54-g00ecf