summaryrefslogtreecommitdiff
path: root/actions/favor.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/favor.php')
-rw-r--r--actions/favor.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/actions/favor.php b/actions/favor.php
index 10ad6b809..142d83ae1 100644
--- a/actions/favor.php
+++ b/actions/favor.php
@@ -63,8 +63,19 @@ class FavorAction extends Action {
$this->notify($fave, $notice, $user);
- common_redirect(common_local_url('showfavorites',
- array('nickname' => $user->nickname)));
+ if ($this->boolean('ajax')) {
+ common_start_html('text/xml');
+ common_element_start('head');
+ common_element('title', _('Disfavor'));
+ common_element_end('head');
+ common_element_start('body');
+ common_disfavor_form($notice);
+ common_element_end('body');
+ common_element_end('html');
+ } else {
+ common_redirect(common_local_url('showfavorites',
+ array('nickname' => $user->nickname)));
+ }
}
function notify($fave, $notice, $user) {