summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-09-10 21:13:30 -0400
committerCraig Andrews <candrews@integralblue.com>2009-09-10 21:13:30 -0400
commit2a56245614f90221946ab918e820f6546133a212 (patch)
treeed4a1d7d692f76e3e4f78b37f12645b0442b8949 /lib/util.php
parentb46d2e7fe0b4129817d9c23006a5e2b7ffe5974c (diff)
Re-use enclosure decision logic to decide if a link gets a paperclip/lightbox popup.
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php5
1 files changed, 3 insertions, 2 deletions
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;