]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/showgroup.php
merge 0.9.x into 1.0.x
[quix0rs-gnu-social.git] / actions / showgroup.php
index 49c8e04dcdec462dfbbf448916c32bb74ebb971f..5bb90e86dd2daaf77d1cadeea6dfef831ebb4cb3 100644 (file)
@@ -146,11 +146,9 @@ class ShowgroupAction extends GroupDesignAction
             return false;
         }
 
-        $cur = common_current_user();
-
-        $this->userProfile = (empty($cur)) ? null : $cur->getProfile();
+        $this->userProfile = Profile::current();
 
-        $stream = new GroupNoticeStream($this->group, $this->userProfile);
+        $stream = new ThreadingGroupNoticeStream($this->group, $this->userProfile);
 
         $this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE,
                                             NOTICES_PER_PAGE + 1);
@@ -201,7 +199,7 @@ class ShowgroupAction extends GroupDesignAction
      */
     function showGroupNotices()
     {
-        $nl = new ThreadedNoticeList($notice, $this, $this->userProfile);
+        $nl = new ThreadedNoticeList($this->notice, $this, $this->userProfile);
         $cnt = $nl->show();
 
         $this->pagination($this->page > 1,
@@ -440,3 +438,11 @@ class GroupMembersMiniListItem extends ProfileMiniListItem
         return $aAttrs;
     }
 }
+
+class ThreadingGroupNoticeStream extends ThreadingNoticeStream
+{
+    function __construct($group, $profile)
+    {
+        parent::__construct(new GroupNoticeStream($group, $profile));
+    }
+}
\ No newline at end of file