- common_redirect(common_local_url('all', array('nickname' =>
- $user->nickname)));
- }
-}
\ No newline at end of file
+ if($result != true) {
+ $this->clientError($result);
+ return;
+ }
+
+ if ($this->boolean('ajax')) {
+ common_start_html('text/xml;charset=utf-8', true);
+ $this->elementStart('head');
+ $this->element('title', null, _('Subscribed'));
+ $this->elementEnd('head');
+ $this->elementStart('body');
+ common_unsubscribe_form($other->getProfile());
+ $this->elementEnd('body');
+ $this->elementEnd('html');
+ } else {
+ common_redirect(common_local_url('subscriptions', array('nickname' =>
+ $user->nickname)));
+ }
+ }
+}