X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=actions%2Fshowgroup.php;h=5bb90e86dd2daaf77d1cadeea6dfef831ebb4cb3;hb=c97048d01bea468e0cf8865b60c3c250b4515c39;hp=49c8e04dcdec462dfbbf448916c32bb74ebb971f;hpb=820e19e1974690f2a928982e8b6f387d1bc10f2f;p=quix0rs-gnu-social.git diff --git a/actions/showgroup.php b/actions/showgroup.php index 49c8e04dcd..5bb90e86dd 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -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