diff options
author | nodiscc <nodiscc@gmail.com> | 2015-01-05 20:13:15 +0100 |
---|---|---|
committer | nodiscc <nodiscc@gmail.com> | 2015-01-05 20:13:15 +0100 |
commit | 002f9625ec7d0f7673da1e7098fdea76487d0538 (patch) | |
tree | c28f95311a5f73df2bfcd1a2d341601df718a8d5 | |
parent | f8d83b35b634c82b47f9995632f96d47fd5d883b (diff) | |
parent | 657837af111387c93b3a75149d93856df12c00d9 (diff) | |
download | Shaarli-002f9625ec7d0f7673da1e7098fdea76487d0538.tar.gz Shaarli-002f9625ec7d0f7673da1e7098fdea76487d0538.tar.zst Shaarli-002f9625ec7d0f7673da1e7098fdea76487d0538.zip |
Merge pull request #90 from shaarli/issue-87
Redirect to home page after deleting a link (Fixes issue 87)
-rw-r--r-- | index.php | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1546,9 +1546,7 @@ function renderPage() | |||
1546 | 1546 | ||
1547 | // If we are called from the bookmarklet, we must close the popup: | 1547 | // If we are called from the bookmarklet, we must close the popup: |
1548 | if (isset($_GET['source']) && $_GET['source']=='bookmarklet') { echo '<script language="JavaScript">self.close();</script>'; exit; } | 1548 | if (isset($_GET['source']) && $_GET['source']=='bookmarklet') { echo '<script language="JavaScript">self.close();</script>'; exit; } |
1549 | $returnurl = ( isset($_POST['returnurl']) ? $_POST['returnurl'] : '?' ); | 1549 | header('Location: ?'); // After deleting the link, redirect to the home page. |
1550 | if ($returnurl=='?') { $returnurl = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '?'); } | ||
1551 | header('Location: '.$returnurl); // After deleting the link, redirect to the page the user was on. | ||
1552 | exit; | 1550 | exit; |
1553 | } | 1551 | } |
1554 | 1552 | ||