]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'link-atom-fix' into 'nightly'
authormmn <mmn@hethane.se>
Sat, 10 Oct 2015 20:33:58 +0000 (20:33 +0000)
committermmn <mmn@hethane.se>
Sat, 10 Oct 2015 20:33:58 +0000 (20:33 +0000)
atom: <link> urls should be attr, not content

Some activities (ex: repeats and follows) have <link>s like this:
<link rel="alternate" type="text/html">http://example.org</link>

This commit changes them to:
<link rel="alternate" type="text/html" href="http://example.org"/>

See merge request !30

1  2 
lib/activity.php

diff --combined lib/activity.php
index 4db3b9ff4e801c2bab10772ebb800ddadf578a0c,93d815e8b4eac9967fd921f21b1177e27465b361..3128088ca21b45772ff844e60ce98cc14378888d
@@@ -244,7 -244,7 +244,7 @@@ class Activit
  
          if (!empty($targetEl)) {
              $this->target = new ActivityObject($targetEl);
 -        } elseif (ActivityUtils::compareTypes($this->verb, array(ActivityVerb::FAVORITE))) {
 +        } elseif (ActivityUtils::compareVerbs($this->verb, array(ActivityVerb::FAVORITE))) {
              // StatusNet didn't send a 'target' for their Favorite atom entries
              $this->target = clone($this->objects[0]);
          }
  
              if (!empty($this->link)) {
                  $xs->element('link', array('rel' => 'alternate',
-                                            'type' => 'text/html'),
-                              $this->link);
+                                            'type' => 'text/html',
+                                            'href' => $this->link));
              }
  
          }