X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fshowstream.php;h=28bb8453f8c1111dd04a44b9fcff947273fd146b;hb=28ef2ccf427683837dde29f8b89ea8d5378f287b;hp=ecd952635335648028e6aeb66f7413959c149515;hpb=0356953cf853bf3bc9eda66f88b5ef4718683337;p=quix0rs-gnu-social.git diff --git a/actions/showstream.php b/actions/showstream.php index ecd9526353..28bb8453f8 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -110,6 +110,8 @@ class ShowstreamAction extends Action $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; + common_set_returnto($this->selfUrl()); + return true; } @@ -140,7 +142,12 @@ class ShowstreamAction extends Action function showPageTitle() { - $this->element('h1', NULL, $this->profile->nickname._("'s profile")); + $user =& common_current_user(); + if ($user && ($user->id == $this->profile->id)) { + $this->element('h1', NULL, _("Your profile")); + } else { + $this->element('h1', NULL, sprintf(_('%s\'s profile'), $this->profile->nickname)); + } } function showPageNoticeBlock() @@ -170,26 +177,22 @@ class ShowstreamAction extends Action function showFeeds() { - // Feeds $this->element('link', array('rel' => 'alternate', - 'href' => common_local_url('api', - array('apiaction' => 'statuses', - 'method' => 'entity_timeline.rss', - 'argument' => $this->user->nickname)), - 'type' => 'application/rss+xml', - 'title' => sprintf(_('Notice feed for %s'), $this->user->nickname))); - $this->element('link', array('rel' => 'alternate feed', - 'href' => common_local_url('api', - array('apiaction' => 'statuses', - 'method' => 'entity_timeline.atom', - 'argument' => $this->user->nickname)), - 'type' => 'application/atom+xml', - 'title' => sprintf(_('Notice feed for %s'), $this->user->nickname))); - $this->element('link', array('rel' => 'alternate', - 'href' => common_local_url('userrss', array('nickname' => - $this->user->nickname)), - 'type' => 'application/rdf+xml', - 'title' => sprintf(_('Notice feed for %s'), $this->user->nickname))); + 'type' => 'application/rss+xml', + 'href' => common_local_url('userrss', + array('nickname' => $this->user->nickname)), + 'title' => sprintf(_('Notice feed for %s (RSS)'), + $this->user->nickname))); + + $this->element('link', + array('rel' => 'alternate', + 'href' => common_local_url('api', + array('apiaction' => 'statuses', + 'method' => 'user_timeline.atom', + 'argument' => $this->user->nickname)), + 'type' => 'application/atom+xml', + 'title' => sprintf(_('Notice feed for %s (Atom)'), + $this->user->nickname))); } function extraHead() @@ -239,7 +242,7 @@ class ShowstreamAction extends Action $this->elementStart('dl', 'entity_depiction'); $this->element('dt', null, _('Photo')); $this->elementStart('dd'); - $this->element('img', array('src' => ($avatar) ? common_avatar_display_url($avatar) : common_default_avatar(AVATAR_PROFILE_SIZE), + $this->element('img', array('src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE), 'class' => 'photo avatar', 'width' => AVATAR_PROFILE_SIZE, 'height' => AVATAR_PROFILE_SIZE,