var $page = null;
var $notice;
var $userProfile = null;
- var $mode = 'conversation';
function isReadOnly($args)
{
$this->userProfile = Profile::current();
- $this->mode = $this->trimmed('mode', 'conversation');
+ $user = common_current_user();
- if ($this->mode == 'stream') {
+ if (!empty($user) && $user->streamModeOnly()) {
$stream = new PublicNoticeStream($this->userProfile);
} else {
$stream = new ThreadingPublicNoticeStream($this->userProfile);
$this->element('link', array('rel' => 'EditURI',
'type' => 'application/rsd+xml',
'href' => $rsd));
+
+ if ($this->page != 1) {
+ $this->element('link', array('rel' => 'canonical',
+ 'href' => common_local_url('public')));
+ }
}
/**
*/
function showContent()
{
- if ($this->mode == 'stream') {
+ $user = common_current_user();
+
+ if (!empty($user) && $user->streamModeOnly()) {
$nl = new NoticeList($this->notice, $this);
} else {
$nl = new ThreadedNoticeList($this->notice, $this, $this->userProfile);
$ibs->show();
}
- $pop = new PopularNoticeSection($this);
+ $p = Profile::current();
+
+ $pop = new PopularNoticeSection($this, $p);
$pop->show();
if (!common_config('performance', 'high')) {
$cloud = new PublicTagCloudSection($this);