From: Evan Prodromou Date: Tue, 11 Aug 2009 14:23:11 +0000 (-0400) Subject: Merge branch 'master' into 0.8.x X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2d29800b6f2f5e7581241dfa3e0a19fc5925049c;p=quix0rs-gnu-social.git Merge branch 'master' into 0.8.x Conflicts: lib/mail.php lib/rssaction.php lib/twitterapi.php --- 2d29800b6f2f5e7581241dfa3e0a19fc5925049c diff --cc lib/twitterapi.php index a5dc2067f8,ab6c0d62c8..5830072086 --- a/lib/twitterapi.php +++ b/lib/twitterapi.php @@@ -186,22 -186,22 +186,22 @@@ class TwitterapiAction extends Actio $twitter_status['favorited'] = false; } - # Enclosures + // Enclosures $attachments = $notice->attachments(); - $enclosures = array(); - - foreach ($attachments as $attachment) { - if ($attachment->isEnclosure()) { - $enclosure = array(); - $enclosure['url'] = $attachment->url; - $enclosure['mimetype'] = $attachment->mimetype; - $enclosure['size'] = $attachment->size; - $enclosures[] = $enclosure; - } - } - if (!empty($enclosures)) { - $twitter_status['attachments'] = $enclosures; + if (!empty($attachments)) { + + $twitter_status['attachments'] = array(); + + foreach ($attachments as $attachment) { + if ($attachment->isEnclosure()) { + $enclosure = array(); + $enclosure['url'] = $attachment->url; + $enclosure['mimetype'] = $attachment->mimetype; + $enclosure['size'] = $attachment->size; + $twitter_status['attachments'][] = $enclosure; + } + } } if ($include_user) {