aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorEmilien Klein <emilien@klein.st>2015-01-04 15:19:14 -0500
committerEmilien Klein <emilien@klein.st>2015-01-04 15:19:14 -0500
commit657837af111387c93b3a75149d93856df12c00d9 (patch)
treec28f95311a5f73df2bfcd1a2d341601df718a8d5 /index.php
parentf8d83b35b634c82b47f9995632f96d47fd5d883b (diff)
downloadShaarli-657837af111387c93b3a75149d93856df12c00d9.tar.gz
Shaarli-657837af111387c93b3a75149d93856df12c00d9.tar.zst
Shaarli-657837af111387c93b3a75149d93856df12c00d9.zip
Redirect to home page after deleting a link
Fixes issue 87
Diffstat (limited to 'index.php')
-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