*/
class ShowstreamAction extends ProfileAction
{
+ var $notice;
+
+ function prepare($args)
+ {
+ parent::prepare($args);
+
+ $p = Profile::current();
+
+ if (empty($this->tag)) {
+ $stream = new ProfileNoticeStream($this->profile, $p);
+ } else {
+ $stream = new TaggedProfileNoticeStream($this->profile, $this->tag, $p);
+ }
+
+ $this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
+
+ return true;
+ }
+
function isReadOnly($args)
{
return true;
$this->element('link', array('rel' => 'EditURI',
'type' => 'application/rsd+xml',
'href' => $rsd));
+
+ if ($this->page != 1) {
+ $this->element('link', array('rel' => 'canonical',
+ 'href' => $this->profile->profileurl));
+ }
}
function showEmptyListMessage()
function showNotices()
{
- $notice = empty($this->tag)
- ? $this->user->getNotices(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1)
- : $this->user->getTaggedNotices($this->tag, ($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1, 0, 0, null);
-
$pnl = null;
- if (Event::handle('ShowStreamNoticeList', array($notice, $this, &$pnl))) {
- $pnl = new ProfileNoticeList($notice, $this);
+ if (Event::handle('ShowStreamNoticeList', array($this->notice, $this, &$pnl))) {
+ $pnl = new ProfileNoticeList($this->notice, $this);
}
$cnt = $pnl->show();
if (0 == $cnt) {
// TRANS: Announcement for anonymous users showing a timeline if site registrations are closed or invite only.
// TRANS: This message contains a Markdown link. Keep "](" together.
$m = sprintf(_('**%s** has an account on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
- 'based on the Free Software [StatusNet](http://status.net/) tool. '),
+ 'based on the Free Software [StatusNet](http://status.net/) tool.'),
$this->user->nickname, $this->user->nickname);
}
$this->elementStart('div', array('id' => 'anon_notice'));
function showSections()
{
parent::showSections();
- $cloud = new PersonalTagCloudSection($this, $this->user);
- $cloud->show();
+ if (!common_config('performance', 'high')) {
+ $cloud = new PersonalTagCloudSection($this, $this->user);
+ $cloud->show();
+ }
}
function noticeFormOptions()