summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/nudge.php7
-rw-r--r--actions/showstream.php8
2 files changed, 9 insertions, 6 deletions
diff --git a/actions/nudge.php b/actions/nudge.php
index 0f50e67ad..2685774a5 100644
--- a/actions/nudge.php
+++ b/actions/nudge.php
@@ -36,7 +36,7 @@ class NudgeAction extends Action {
$other = User::staticGet('nickname', $other_nickname);
$this->notify($user, $other);
- if (true || $this->boolean('ajax')) {
+ if ($this->boolean('ajax')) {
common_start_html('text/xml');
common_element_start('head');
common_element('title', null, _('Nudge sent'));
@@ -46,8 +46,9 @@ class NudgeAction extends Action {
common_element_end('body');
common_element_end('html');
} else {
- common_redirect(common_local_url('nudge',
- array('nickname' => $user->nickname)));
+ // display a confirmation to the user
+ common_redirect(common_local_url('showstream',
+ array('nickname' => $other->nickname)));
}
}
diff --git a/actions/showstream.php b/actions/showstream.php
index 56858b477..3b8f71114 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -191,9 +191,11 @@ class ShowstreamAction extends StreamAction {
common_element('a', array('href' => common_local_url('newmessage', array('to' => $user->id))),
_('Send a message'));
common_element_end('li');
- common_element_start('li', array('id' => 'profile_nudge'));
- common_nudge_form($user);
- common_element_end('li');
+ if ($user->email && $user->emailnotifynudge) {
+ common_element_start('li', array('id' => 'profile_nudge'));
+ common_nudge_form($user);
+ common_element_end('li');
+ }
}
common_element_end('ul');