]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/apiaction.php
Merge branch 'testing' into 0.9.x
[quix0rs-gnu-social.git] / lib / apiaction.php
index 8049c0901662f1ec437876b3387081cc7664c3de..e4a1df3d198400fd3aa64b03c2a8d36cf5af425e 100644 (file)
@@ -86,7 +86,7 @@ class ApiAction extends Action
         $this->since_id = (int)$this->arg('since_id', 0);
 
         if ($this->arg('since')) {
-            $this->clientError(_("since parameter is disabled for performance; use since_id"), 403);
+            header('X-StatusNet-Warning: since parameter is disabled; use since_id');
         }
 
         return true;
@@ -291,11 +291,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;
                 }
             }