From d6245dca6347a670445701e9c726b0719ea945c8 Mon Sep 17 00:00:00 2001 From: Sean Murphy Date: Fri, 6 Feb 2009 18:36:34 -0500 Subject: Fixed #1048: Edit avatar link on profile page. --- actions/showstream.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'actions/showstream.php') diff --git a/actions/showstream.php b/actions/showstream.php index eab1fc0a2..3b4c97865 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -245,6 +245,15 @@ class ShowstreamAction extends Action 'height' => AVATAR_PROFILE_SIZE, 'alt' => $this->profile->nickname)); $this->elementEnd('dd'); + + $user = User::staticGet('id', $this->profile->id); + $cur = common_current_user(); + if ($cur && $cur->id == $user->id) { + $this->elementStart('dd'); + $this->element('a', array('href' => common_local_url('avatarsettings')), _('Edit Avatar')); + $this->elementEnd('dd'); + } + $this->elementEnd('dl'); $this->elementStart('dl', 'entity_nickname'); @@ -317,7 +326,6 @@ class ShowstreamAction extends Action $this->element('h2', null, _('User actions')); $this->elementStart('ul'); $this->elementStart('li', array('class' => 'entity_subscribe')); - $cur = common_current_user(); if ($cur) { if ($cur->id != $this->profile->id) { if ($cur->isSubscribed($this->profile)) { @@ -335,7 +343,6 @@ class ShowstreamAction extends Action // common_profile_new_message_nudge($cur, $this->user, $this->profile); - $user = User::staticGet('id', $this->profile->id); if ($cur && $cur->id != $user->id && $cur->mutuallySubscribed($user)) { $this->elementStart('li', array('class' => 'entity_send-a-message')); $this->element('a', array('href' => common_local_url('newmessage', array('to' => $user->id)), -- cgit v1.2.3-54-g00ecf From 9b7c57d094ef5fc52a8a2c4ac6b7a89b1c221c54 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 9 Feb 2009 12:07:21 -0500 Subject: whitespace and formatting in showstream.php --- actions/showstream.php | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'actions/showstream.php') diff --git a/actions/showstream.php b/actions/showstream.php index 6bed700c2..962f4b452 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -111,7 +111,7 @@ class ShowstreamAction extends Action $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; common_set_returnto($this->selfUrl()); - + return true; } @@ -178,21 +178,21 @@ class ShowstreamAction extends Action function showFeeds() { $this->element('link', array('rel' => 'alternate', - '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))); + '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() @@ -206,7 +206,7 @@ class ShowstreamAction extends Action // for remote subscriptions etc. $this->element('meta', array('http-equiv' => 'X-XRDS-Location', 'content' => common_local_url('xrds', array('nickname' => - $this->user->nickname)))); + $this->user->nickname)))); if ($this->profile->bio) { $this->element('meta', array('name' => 'description', @@ -248,7 +248,7 @@ class ShowstreamAction extends Action 'height' => AVATAR_PROFILE_SIZE, 'alt' => $this->profile->nickname)); $this->elementEnd('dd'); - + $user = User::staticGet('id', $this->profile->id); $cur = common_current_user(); if ($cur && $cur->id == $user->id) { @@ -256,7 +256,7 @@ class ShowstreamAction extends Action $this->element('a', array('href' => common_local_url('avatarsettings')), _('Edit Avatar')); $this->elementEnd('dd'); } - + $this->elementEnd('dl'); $this->elementStart('dl', 'entity_nickname'); @@ -265,7 +265,7 @@ class ShowstreamAction extends Action $hasFN = ($this->profile->fullname) ? 'nickname url uid' : 'fn nickname url uid'; $this->element('a', array('href' => $this->profile->profileurl, 'rel' => 'me', 'class' => $hasFN), - $this->profile->nickname); + $this->profile->nickname); $this->elementEnd('dd'); $this->elementEnd('dl'); @@ -333,7 +333,7 @@ class ShowstreamAction extends Action $this->elementStart('li', 'entity_edit'); $this->element('a', array('href' => common_local_url('profilesettings'), 'title' => _('Edit profile settings')), - _('Edit')); + _('Edit')); $this->elementEnd('li'); } @@ -356,7 +356,7 @@ class ShowstreamAction extends Action } if ($cur && $cur->id != $user->id && $cur->mutuallySubscribed($user)) { - $this->elementStart('li', 'entity_send-a-message'); + $this->elementStart('li', 'entity_send-a-message'); $this->element('a', array('href' => common_local_url('newmessage', array('to' => $user->id)), 'title' => _('Send a direct message to this user')), _('Message')); @@ -498,7 +498,7 @@ class ShowstreamAction extends Action $this->elementStart('dl', 'entity_member-since'); $this->element('dt', null, _('Member since')); $this->element('dd', null, date('j M Y', - strtotime($this->profile->created))); + strtotime($this->profile->created))); $this->elementEnd('dl'); $this->elementStart('dl', 'entity_subscriptions'); -- cgit v1.2.3-54-g00ecf