]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/api.php
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
[quix0rs-gnu-social.git] / lib / api.php
index fd07bbbbe080a6644c9e69dcd7b624d82942db95..b987badc06a78bfd74053a5f96b032715c42b768 100644 (file)
@@ -289,11 +289,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;
                 }
             }