]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/activityobject.php
Merge remote-tracking branch 'upstream/nightly' into nightly
[quix0rs-gnu-social.git] / lib / activityobject.php
index ca6390b725331704f878d152367f1a3fb8c0cead..d211136d3ce72c4adc9bfb347d3d57bf9e878357 100644 (file)
@@ -28,9 +28,7 @@
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET')) {
-    exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 require_once(INSTALLDIR.'/lib/activitystreamjsondocument.php');
 
@@ -269,6 +267,22 @@ class ActivityObject
         if (empty($this->id) && !empty($this->link)) { // fallback if there's no ID
             $this->id = $this->link;
         }
+
+        $els = $element->childNodes;
+        $out = array();
+
+        for ($i = 0; $i < $els->length; $i++) {
+            $link = $els->item($i);
+            if ($link->localName == ActivityUtils::LINK && $link->namespaceURI == ActivityUtils::ATOM) {
+                $attrs = array();
+                foreach ($link->attributes as $attrName=>$attrNode) {
+                    $attrs[$attrName] = $attrNode->nodeValue;
+                }
+                $this->extra[] = [$link->localName,
+                                    $attrs,
+                                    $link->nodeValue];
+            }
+        }
     }
 
     // @todo FIXME: rationalize with Activity::_fromRssItem()