]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
preserve activities in object
authorEvan Prodromou <evan@status.net>
Sun, 2 Jan 2011 23:22:12 +0000 (15:22 -0800)
committerEvan Prodromou <evan@status.net>
Sun, 16 Jan 2011 22:15:26 +0000 (17:15 -0500)
lib/useractivitystream.php

index 0fc315e26e2ff9de63f86483061b50426d3f4058..7d9b02ded8606594815338c59ff16880f0aabd80 100644 (file)
@@ -28,6 +28,8 @@
 
 class UserActivityStream extends AtomUserNoticeFeed
 {
+    public $activities = array();
+
     function __construct($user, $indent = true)
     {
         parent::__construct($user, null, $indent);
@@ -45,10 +47,15 @@ class UserActivityStream extends AtomUserNoticeFeed
         usort($objs, 'UserActivityStream::compareObject');
 
         foreach ($objs as $obj) {
-            $act = $obj->asActivity();
+            $this->activities[] = $obj->asActivity();
+        }
+    }
+    
+    function renderEntries()
+    {
+        foreach ($this->activities as $act) {
             // Only show the author sub-element if it's different from default user
-            $str = $act->asString(false, ($act->actor->id != $this->user->uri));
-            $this->addEntryRaw($str);
+            $act->outputTo($this, false, ($act->actor->id != $this->user->uri));
         }
     }