]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
correctly generate enclosure in Activity::asString()
authorEvan Prodromou <evan@status.net>
Mon, 6 Dec 2010 20:51:42 +0000 (15:51 -0500)
committerEvan Prodromou <evan@status.net>
Mon, 6 Dec 2010 20:51:42 +0000 (15:51 -0500)
lib/activity.php

index 1b4651d89fdb2cdc8f15b96f6c3641b459f5af2a..e29bc1a25da093b812bcf28beb194e19ca0b3e4b 100644 (file)
@@ -478,7 +478,8 @@ class Activity
         
         foreach ($this->enclosures as $enclosure) {
             if (is_string($enclosure)) {
-                $xs->element('link', array('href' => $enclosure));
+                $xs->element('link', array('rel' => 'enclosure',
+                                           'href' => $enclosure));
             } else {
                 $attributes = array('rel' => 'enclosure',
                                     'href' => $enclosure->url,
@@ -487,7 +488,7 @@ class Activity
                 if ($enclosure->title) {
                     $attributes['title'] = $enclosure->title;
                 }
-                $xs->element('link', array('href' => $enclosure));
+                $xs->element('link', $attributes);
             }
         }