]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
allow <Property> elements in <Link> in XRD
authorEvan Prodromou <evan@status.net>
Tue, 7 Dec 2010 20:53:08 +0000 (15:53 -0500)
committerEvan Prodromou <evan@status.net>
Tue, 7 Dec 2010 20:53:08 +0000 (15:53 -0500)
lib/xrd.php

index c8cffed9cde255fd14decbb0d68c2353fcfee748..9c6d9f3ab70044a4d8573ff713c38778fca51f88 100644 (file)
@@ -130,14 +130,24 @@ class XRD
 
         foreach ($this->links as $link) {
             $titles = array();
+            $properties = array();
             if (isset($link['title'])) {
                 $titles = $link['title'];
                 unset($link['title']);
             }
+            if (isset($link['property'])) {
+                $properties = $link['property'];
+                unset($link['property']);
+            }
             $xs->elementStart('Link', $link);
             foreach ($titles as $title) {
                 $xs->element('Title', null, $title);
             }
+            foreach ($properties as $property) {
+                $xs->element('Property',
+                             array('type' => $property['type']),
+                             $property['value']);
+            }
             $xs->elementEnd('Link');
         }