We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 19bd6fde authored by Evan Prodromou's avatar Evan Prodromou

pass user profile to ThreadedNoticeList in PublicAction

parent cc9f65ac
......@@ -59,6 +59,7 @@ class PublicAction extends Action
var $page = null;
var $notice;
var $userProfile = null;
function isReadOnly($args)
{
......@@ -85,15 +86,9 @@ class PublicAction extends Action
common_set_returnto($this->selfUrl());
$profile = null;
$user = common_current_user();
$this->userProfile = Profile::current();
if (!empty($user)) {
$profile = $user->getProfile();
}
$stream = new PublicNoticeStream($profile);
$stream = new PublicNoticeStream($this->userProfile);
$this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE,
NOTICES_PER_PAGE + 1);
......@@ -213,7 +208,7 @@ class PublicAction extends Action
*/
function showContent()
{
$nl = new ThreadedNoticeList($this->notice, $this);
$nl = new ThreadedNoticeList($this->notice, $this, $this->userProfile);
$cnt = $nl->show();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment