X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fshowstream.php;h=890c1e711b316a99207fb7a2ac736cb2ba70264c;hb=c4f60ab444ab4768d12c5a4e6de010b185da7528;hp=254e4f43da8fc9b8832e350819ef90241846f2bc;hpb=b22acbb42e2cefa4c3d94f192b735519b1182f07;p=quix0rs-gnu-social.git diff --git a/actions/showstream.php b/actions/showstream.php index 254e4f43da..890c1e711b 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -45,39 +45,8 @@ if (!defined('GNUSOCIAL')) { exit(1); } * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ -class ShowstreamAction extends ProfileAction +class ShowstreamAction extends NoticestreamAction { - var $notice; - - protected function doPreparation() - { - // showstream requires a nickname - $nickname_arg = $this->arg('nickname'); - $nickname = common_canonical_nickname($nickname_arg); - - // Permanent redirect on non-canonical nickname - - if ($nickname_arg != $nickname) { - $args = array('nickname' => $nickname); - if ($this->arg('page') && $this->arg('page') != 1) { - $args['page'] = $this->arg['page']; - } - common_redirect(common_local_url($this->getActionName(), $args), 301); - } - $this->user = User::getKV('nickname', $nickname); - - if (!$this->user) { - $group = Local_group::getKV('nickname', $nickname); - if ($group instanceof Local_group) { - common_redirect($group->getProfile()->getUrl()); - } - // TRANS: Client error displayed when calling a profile action without specifying a user. - $this->clientError(_('No such user.'), 404); - } - - $this->target = $this->user->getProfile(); - } - public function getStream() { if (empty($this->tag)) { @@ -194,13 +163,6 @@ class ShowstreamAction extends ProfileAction 'content' => $this->target->getDescription())); } - if ($this->target->isLocal() && $this->target->getUser()->emailmicroid && $this->target->getUser()->email && $this->target->getUrl()) { - $id = new Microid('mailto:'.$this->target->getUser()->email, - $this->selfUrl()); - $this->element('meta', array('name' => 'microid', - 'content' => $id->toString())); - } - // See https://wiki.mozilla.org/Microsummaries $this->element('link', array('rel' => 'microsummary', @@ -289,7 +251,7 @@ class ShowstreamAction extends ProfileAction { parent::showSections(); if (!common_config('performance', 'high')) { - $cloud = new PersonalTagCloudSection($this, $this->user); + $cloud = new PersonalTagCloudSection($this->target, $this); $cloud->show(); } } @@ -298,7 +260,7 @@ class ShowstreamAction extends ProfileAction { $options = parent::noticeFormOptions(); - if (!$this->scoped instanceof Profile || $this->scoped->id != $this->target->id) { + if (!$this->scoped instanceof Profile || !$this->scoped->sameAs($this->target)) { $options['to_profile'] = $this->target; }