From c30f95c55cb4fcdde53c0549335d29ed6849cf95 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Fri, 22 Jan 2010 10:12:26 -0500 Subject: Updated some references to the long gnone "isEnclosure" function to the new "getEnclosure" --- lib/apiaction.php | 9 +++++---- lib/util.php | 17 +++++------------ 2 files changed, 10 insertions(+), 16 deletions(-) (limited to 'lib') diff --git a/lib/apiaction.php b/lib/apiaction.php index 8049c0901..f71432e03 100644 --- a/lib/apiaction.php +++ b/lib/apiaction.php @@ -291,11 +291,12 @@ class ApiAction extends Action $twitter_status['attachments'] = array(); foreach ($attachments as $attachment) { - if ($attachment->isEnclosure()) { + $enclosure_o=$attachment->getEnclosure(); + if ($attachment_enclosure) { $enclosure = array(); - $enclosure['url'] = $attachment->url; - $enclosure['mimetype'] = $attachment->mimetype; - $enclosure['size'] = $attachment->size; + $enclosure['url'] = $enclosure_o->url; + $enclosure['mimetype'] = $enclosure_o->mimetype; + $enclosure['size'] = $enclosure_o->size; $twitter_status['attachments'][] = $enclosure; } } diff --git a/lib/util.php b/lib/util.php index 439db581a..add1b0ae6 100644 --- a/lib/util.php +++ b/lib/util.php @@ -770,20 +770,13 @@ function common_linkify($url) { } if (!empty($f)) { - if ($f->isEnclosure()) { + if ($f->getEnclosure()) { $is_attachment = true; $attachment_id = $f->id; - } 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; - - $thumb = File_thumbnail::staticGet('file_id', $f->id); - if (!empty($thumb)) { - $has_thumb = true; - } + + $thumb = File_thumbnail::staticGet('file_id', $f->id); + if (!empty($thumb)) { + $has_thumb = true; } } } -- cgit v1.2.3-54-g00ecf