summaryrefslogtreecommitdiff
path: root/actions/subscribe.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/subscribe.php')
-rw-r--r--actions/subscribe.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/actions/subscribe.php b/actions/subscribe.php
index 20c258923..10951dc3b 100644
--- a/actions/subscribe.php
+++ b/actions/subscribe.php
@@ -53,8 +53,19 @@ class SubscribeAction extends Action {
common_user_error($result);
return;
}
-
- common_redirect(common_local_url('subscriptions', array('nickname' =>
+
+ if ($this->boolean('ajax')) {
+ common_start_html('text/xml');
+ common_element_start('head');
+ common_element('title', null, _('Subscribed'));
+ common_element_end('head');
+ common_element_start('body');
+ common_subscribe_response();
+ common_element_end('body');
+ common_element_end('html');
+ } else {
+ common_redirect(common_local_url('subscriptions', array('nickname' =>
$user->nickname)));
+ }
}
-} \ No newline at end of file
+}