summaryrefslogtreecommitdiff
path: root/actions/unsubscribe.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/unsubscribe.php')
-rw-r--r--actions/unsubscribe.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/actions/unsubscribe.php b/actions/unsubscribe.php
index 4bfaf7958..562dd00fc 100644
--- a/actions/unsubscribe.php
+++ b/actions/unsubscribe.php
@@ -49,7 +49,18 @@ class UnsubscribeAction extends Action {
return;
}
- common_redirect(common_local_url('subscriptions', array('nickname' =>
- $user->nickname)));
+ if ($this->boolean('ajax')) {
+ common_start_html('text/xml');
+ common_element_start('head');
+ common_element('title', null, _('Unsubscribed'));
+ common_element_end('head');
+ common_element_start('body');
+ common_unsubscribe_response();
+ common_element_end('body');
+ common_element_end('html');
+ } else {
+ common_redirect(common_local_url('subscriptions', array('nickname' =>
+ $user->nickname)));
+ }
}
}