Skip to content

Commit

Permalink
Merge pull request shaarli#90 from shaarli/issue-87
Browse files Browse the repository at this point in the history
Redirect to home page after deleting a link (Fixes issue 87)
  • Loading branch information
nodiscc committed Jan 5, 2015
2 parents f8d83b3 + 657837a commit 002f962
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -1546,9 +1546,7 @@ function renderPage()

// If we are called from the bookmarklet, we must close the popup:
if (isset($_GET['source']) && $_GET['source']=='bookmarklet') { echo '<script language="JavaScript">self.close();</script>'; exit; }
$returnurl = ( isset($_POST['returnurl']) ? $_POST['returnurl'] : '?' );
if ($returnurl=='?') { $returnurl = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '?'); }
header('Location: '.$returnurl); // After deleting the link, redirect to the page the user was on.
header('Location: ?'); // After deleting the link, redirect to the home page.
exit;
}

Expand Down

0 comments on commit 002f962

Please sign in to comment.