aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornodiscc <nodiscc@gmail.com>2015-01-05 20:13:15 +0100
committernodiscc <nodiscc@gmail.com>2015-01-05 20:13:15 +0100
commit002f9625ec7d0f7673da1e7098fdea76487d0538 (patch)
treec28f95311a5f73df2bfcd1a2d341601df718a8d5
parentf8d83b35b634c82b47f9995632f96d47fd5d883b (diff)
parent657837af111387c93b3a75149d93856df12c00d9 (diff)
downloadShaarli-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.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/index.php b/index.php
index c4c45e53..e50c0181 100644
--- a/index.php
+++ b/index.php
@@ -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