summaryrefslogtreecommitdiff
path: root/lib/api.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-22 14:19:08 -0500
committerEvan Prodromou <evan@status.net>2010-01-22 14:19:08 -0500
commitd25bd9b2923606a9e4786e8cab3c1bd384235164 (patch)
tree1b8a4c1999806d24fd39c72f298c34cfc8bed57f /lib/api.php
parentc8bc598cfd67353f33d7785556374b5d6865a7d9 (diff)
parent00547ca898733973eea7375152a3cfc83b50ae20 (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib/api.php')
-rw-r--r--lib/api.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/api.php b/lib/api.php
index 794b14050..825262b4c 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -288,11 +288,12 @@ class ApiAction extends Action
$twitter_status['attachments'] = array();
foreach ($attachments as $attachment) {
- if ($attachment->isEnclosure()) {
+ $enclosure_o=$attachment->getEnclosure();
+ if ($enclosure_o) {
$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;
}
}