X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fshowstream.php;h=6e5ba84511ff8c3161b25ee46fad3a39c2d7d4f6;hb=88c00facc807d1c138146c02c703e2294b5d357b;hp=ca7af0f2ed3aea555bef898368e84d831abbf08c;hpb=9948523c33ea0d02681ff1e0cd4fcb839dc9df96;p=quix0rs-gnu-social.git diff --git a/actions/showstream.php b/actions/showstream.php index ca7af0f2ed..6e5ba84511 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -55,6 +55,25 @@ require_once INSTALLDIR.'/lib/feedlist.php'; */ 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; @@ -92,9 +111,6 @@ class ShowstreamAction extends ProfileAction // For YADIS discovery, we also have a tag - header('X-XRDS-Location: '. common_local_url('xrds', array('nickname' => - $this->user->nickname))); - $this->showPage(); } @@ -171,11 +187,6 @@ class ShowstreamAction extends ProfileAction function extraHead() { - // for remote subscriptions etc. - $this->element('meta', array('http-equiv' => 'X-XRDS-Location', - 'content' => common_local_url('xrds', array('nickname' => - $this->user->nickname)))); - if ($this->profile->bio) { $this->element('meta', array('name' => 'description', 'content' => $this->profile->bio)); @@ -232,13 +243,9 @@ class ShowstreamAction extends ProfileAction 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) { @@ -278,8 +285,10 @@ class ShowstreamAction extends ProfileAction 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()