X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=actions%2Fshowstream.php;h=3ac837a67e84dcdaa7e3da5c3049e335e1428d39;hb=1f02dc639ec3dfa44df87c4fa031b3f298ffee7e;hp=51384eb487534a5f508fa63b23573018bee3cffe;hpb=6c4985476e9c29fa7965befd488ead37112e27d7;p=quix0rs-gnu-social.git diff --git a/actions/showstream.php b/actions/showstream.php index 51384eb487..3ac837a67e 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -47,38 +47,6 @@ if (!defined('GNUSOCIAL')) { exit(1); } */ class ShowstreamAction extends NoticestreamAction { - protected $target = null; - - protected function doPreparation() - { - // showstream requires a nickname - $nickname_arg = $this->trimmed('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); - } - - try { - $user = User::getByNickname($nickname); - } catch (NoSuchUserException $e) { - $group = Local_group::getKV('nickname', $nickname); - if ($group instanceof Local_group) { - common_redirect($group->getProfile()->getUrl()); - } - - // No user nor group found, throw the NoSuchUserException again - throw $e; - } - - $this->target = $user->getProfile(); - } - public function getStream() { if (empty($this->tag)) { @@ -90,7 +58,6 @@ class ShowstreamAction extends NoticestreamAction return $stream; } - function title() { $base = $this->target->getFancyName(); @@ -106,7 +73,7 @@ class ShowstreamAction extends NoticestreamAction } } else { if ($this->page == 1) { - return $base; + return sprintf(_('Notices by %s'), $base); } else { // TRANS: Extended page title showing tagged notices in one user's timeline. // TRANS: %1$s is the username, %2$d is the page number. @@ -117,7 +84,7 @@ class ShowstreamAction extends NoticestreamAction } } - function showContent() + protected function showContent() { $this->showNotices(); } @@ -195,13 +162,6 @@ class ShowstreamAction extends NoticestreamAction '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',