<?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
{
parent::prepare($args);
- $stream = new ThreadingInboxNoticeStream($this->user, Profile::current());
+ $user = common_current_user();
+
+ if (!empty($user) && $user->streamModeOnly()) {
+ $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);
$profile = $current_user->getProfile();
}
- $nl = new ThreadedNoticeList($this->notice, $this, $profile);
+ if (!empty($current_user) && $current_user->streamModeOnly()) {
+ $nl = new NoticeList($this->notice, $this);
+ } else {
+ $nl = new ThreadedNoticeList($this->notice, $this, $profile);
+ }
$cnt = $nl->show();
{
// Show invite button, as long as site isn't closed, and
// we have a logged in user.
- if (!common_config('site', 'closed') && common_logged_in()) {
+ if (common_config('invite', 'enabled') && !common_config('site', 'closed') && common_logged_in()) {
if (!common_config('site', 'private')) {
$ibs = new InviteButtonSection(
$this,
// XXX: make this a little more convenient
if (!common_config('performance', 'high')) {
- $pop = new PopularNoticeSection($this);
+ $pop = new PopularNoticeSection($this, Profile::current());
$pop->show();
$pop = new InboxTagCloudSection($this, $this->user);
$pop->show();