Skip to content

Commit

Permalink
Redirect to /admin after edit a post, not referer
Browse files Browse the repository at this point in the history
- Having $_SERVER['HTTP_REFERER'] set is unreliable on some servers, for
  this reason just redirect back to /admin after editing a post.
  • Loading branch information
MitchellMcKenna committed Nov 11, 2013
1 parent db65f81 commit 22a309a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions application/controllers/admin/write.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@ function index()
$new_post = new StdClass();

if ($this->uri->segment(3) == 'edit') {
if ($this->input->post('referer')) {
$data->referer = $this->input->post('referer');
} else {
$data->referer = $_SERVER['HTTP_REFERER'];
}
$data->referer = $this->config->item('base_url') . 'admin';

$data->editing = TRUE;

Expand Down

0 comments on commit 22a309a

Please sign in to comment.