diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-04-01 15:30:59 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-04-01 15:30:59 -0400 |
commit | c172cbafaa9ba17ff8ca5c6dd07741bd0de96871 (patch) | |
tree | bc4d14b74e195e2f22e5e59d82d9ac95308a8e43 /actions/block.php | |
parent | 88bcef127ffb5b906f4196977b64cd096126b946 (diff) |
Try to do intelligent redirect codes
After fixing the redirect code output, there are a lot of weirdnesses
with e.g. form handling. Try to add explicit redirect codes where
needed -- principly when handling a POST.
Diffstat (limited to 'actions/block.php')
-rw-r--r-- | actions/block.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/actions/block.php b/actions/block.php index e77b634c8..34f991dc6 100644 --- a/actions/block.php +++ b/actions/block.php @@ -93,7 +93,8 @@ class BlockAction extends Action if ($this->arg('no')) { $cur = common_current_user(); $other = Profile::staticGet('id', $this->arg('blockto')); - common_redirect(common_local_url('showstream', array('nickname' => $other->nickname))); + common_redirect(common_local_url('showstream', array('nickname' => $other->nickname)), + 303); } elseif ($this->arg('yes')) { $this->blockProfile(); } elseif ($this->arg('blockto')) { @@ -102,7 +103,6 @@ class BlockAction extends Action } } - function showContent() { $this->areYouSureForm(); } @@ -110,7 +110,7 @@ class BlockAction extends Action function title() { return _('Block user'); } - + function showNoticeForm() { // nop } @@ -178,10 +178,11 @@ class BlockAction extends Action } if ($action) { - common_redirect(common_local_url($action, $args)); + common_redirect(common_local_url($action, $args), 303); } else { common_redirect(common_local_url('subscriptions', - array('nickname' => $cur->nickname))); + array('nickname' => $cur->nickname)), + 303); } } } |