Updated some references to the long gnone "isEnclosure" function to the new "getEnclosure"
This commit is contained in:
parent
e9c127ddd8
commit
c30f95c55c
|
@ -279,6 +279,8 @@ class File extends Memcached_DataObject
|
|||
if($oembed->modified) $enclosure->modified=$oembed->modified;
|
||||
unset($oembed->size);
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -770,13 +770,7 @@ function common_linkify($url) {
|
|||
}
|
||||
|
||||
if (!empty($f)) {
|
||||
if ($f->isEnclosure()) {
|
||||
$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
|
||||
if ($f->getEnclosure()) {
|
||||
$is_attachment = true;
|
||||
$attachment_id = $f->id;
|
||||
|
||||
|
@ -786,7 +780,6 @@ function common_linkify($url) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add clippy
|
||||
if ($is_attachment) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user