Support mode in all
This commit is contained in:
parent
e3460d9b24
commit
dba9d71abd
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* StatusNet - the distributed open-source microblogging tool
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
* Copyright (C) 2008, 2009, StatusNet, Inc.
|
* Copyright (C) 2008-2011, StatusNet, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
@ -46,6 +46,7 @@ require_once INSTALLDIR.'/lib/feedlist.php';
|
||||||
class AllAction extends ProfileAction
|
class AllAction extends ProfileAction
|
||||||
{
|
{
|
||||||
var $notice;
|
var $notice;
|
||||||
|
var $mode = 'conversation';
|
||||||
|
|
||||||
function isReadOnly($args)
|
function isReadOnly($args)
|
||||||
{
|
{
|
||||||
|
@ -56,7 +57,13 @@ class AllAction extends ProfileAction
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
|
||||||
$stream = new ThreadingInboxNoticeStream($this->user, Profile::current());
|
$this->mode = $this->trimmed('mode', 'conversation');
|
||||||
|
|
||||||
|
if ($this->mode == 'stream') {
|
||||||
|
$stream = new InboxNoticeStream($this->user, Profile::current());
|
||||||
|
} else {
|
||||||
|
$stream = new ThreadingInboxNoticeStream($this->user, Profile::current());
|
||||||
|
}
|
||||||
|
|
||||||
$this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE,
|
$this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE,
|
||||||
NOTICES_PER_PAGE + 1);
|
NOTICES_PER_PAGE + 1);
|
||||||
|
@ -176,7 +183,11 @@ class AllAction extends ProfileAction
|
||||||
$profile = $current_user->getProfile();
|
$profile = $current_user->getProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
$nl = new ThreadedNoticeList($this->notice, $this, $profile);
|
if ($this->mode == 'stream') {
|
||||||
|
$nl = new NoticeList($this->notice, $this);
|
||||||
|
} else {
|
||||||
|
$nl = new ThreadedNoticeList($this->notice, $this, $profile);
|
||||||
|
}
|
||||||
|
|
||||||
$cnt = $nl->show();
|
$cnt = $nl->show();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user