From: Craig Andrews Date: Fri, 11 Sep 2009 01:13:30 +0000 (-0400) Subject: Re-use enclosure decision logic to decide if a link gets a paperclip/lightbox popup. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2a56245614f90221946ab918e820f6546133a212;p=quix0rs-gnu-social.git Re-use enclosure decision logic to decide if a link gets a paperclip/lightbox popup. --- diff --git a/lib/util.php b/lib/util.php index 256acf1993..292045928d 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;