summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-02-03 15:12:55 -0500
committerEvan Prodromou <evan@controlyourself.ca>2009-02-03 15:12:55 -0500
commit0356953cf853bf3bc9eda66f88b5ef4718683337 (patch)
treee23794c60c2d0ca28fc63fcc52cdb8a532fa1719 /actions
parent22c806a15a957c300cb047cb42e8f5c49d47afa9 (diff)
parent0f2c43bd040437b3e40c706d7c3f4ba163e94a71 (diff)
Merge branch 'master' of evan@dev.controlyourself.ca:/var/www/trunk into 0.7.x
Diffstat (limited to 'actions')
-rw-r--r--actions/opensearch.php4
-rw-r--r--actions/showstream.php24
2 files changed, 18 insertions, 10 deletions
diff --git a/actions/opensearch.php b/actions/opensearch.php
index 7709249bb..2eb818306 100644
--- a/actions/opensearch.php
+++ b/actions/opensearch.php
@@ -67,7 +67,7 @@ class OpensearchAction extends Action
$short_name = _('Notice Search');
}
header('Content-Type: text/html');
- common_start_xml();
+ $this->startXML();
$this->elementStart('OpenSearchDescription', array('xmlns' => 'http://a9.com/-/spec/opensearch/1.1/'));
$short_name = common_config('site', 'name').' '.$short_name;
$this->element('ShortName', null, $short_name);
@@ -81,7 +81,7 @@ class OpensearchAction extends Action
$this->element('OutputEncoding', null, 'UTF-8');
$this->element('InputEncoding', null, 'UTF-8');
$this->elementEnd('OpenSearchDescription');
- common_end_xml();
+ $this->endXML();
}
function isReadOnly()
diff --git a/actions/showstream.php b/actions/showstream.php
index eab1fc0a2..ecd952635 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -312,14 +312,22 @@ class ShowstreamAction extends Action
}
$this->elementEnd('div');
- //XXX: entity_actions doesn't need to be outputted if entity is looking at their own profile
$this->elementStart('div', 'entity_actions');
$this->element('h2', null, _('User actions'));
$this->elementStart('ul');
- $this->elementStart('li', array('class' => 'entity_subscribe'));
$cur = common_current_user();
+
+ if ($cur && $cur->id == $this->profile->id) {
+ $this->elementStart('li', 'entity_edit');
+ $this->element('a', array('href' => common_local_url('profilesettings'),
+ 'title' => _('Edit profile settings')),
+ _('Edit'));
+ $this->elementEnd('li');
+ }
+
if ($cur) {
if ($cur->id != $this->profile->id) {
+ $this->elementStart('li', 'entity_subscribe');
if ($cur->isSubscribed($this->profile)) {
$usf = new UnsubscribeForm($this, $this->profile);
$usf->show();
@@ -327,24 +335,24 @@ class ShowstreamAction extends Action
$sf = new SubscribeForm($this, $this->profile);
$sf->show();
}
+ $this->elementEnd('li');
}
} else {
+ $this->elementStart('li', 'entity_subscribe');
$this->showRemoteSubscribeLink();
+ $this->elementEnd('li');
}
- $this->elementEnd('li');
-
-// 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->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'));
$this->elementEnd('li');
if ($user->email && $user->emailnotifynudge) {
- $this->elementStart('li', array('class' => 'entity_nudge'));
+ $this->elementStart('li', 'entity_nudge');
$nf = new NudgeForm($this, $user);
$nf->show();
$this->elementEnd('li');
@@ -353,7 +361,7 @@ class ShowstreamAction extends Action
if ($cur && $cur->id != $this->profile->id) {
$blocked = $cur->hasBlocked($this->profile);
- $this->elementStart('li', array('class' => 'entity_block'));
+ $this->elementStart('li', 'entity_block');
if ($blocked) {
$ubf = new UnblockForm($this, $this->profile);
$ubf->show();