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

Commit dba9d71a authored by Evan Prodromou's avatar Evan Prodromou

Support mode in all

parent e3460d9b
<?php
/**
* 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
* 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
{
var $notice;
var $mode = 'conversation';
function isReadOnly($args)
{
......@@ -56,7 +57,13 @@ class AllAction extends ProfileAction
{
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,
NOTICES_PER_PAGE + 1);
......@@ -176,7 +183,11 @@ class AllAction extends ProfileAction
$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();
......
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