aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--index.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/index.php b/index.php
index beb1cbca..f736fcf2 100644
--- a/index.php
+++ b/index.php
@@ -1012,7 +1012,12 @@ function renderPage($conf, $pluginManager, $LINKSDB)
1012 $_SESSION['LINKS_PER_PAGE']=abs(intval($_GET['linksperpage'])); 1012 $_SESSION['LINKS_PER_PAGE']=abs(intval($_GET['linksperpage']));
1013 } 1013 }
1014 1014
1015 header('Location: '. generateLocation($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'], array('linksperpage'))); 1015 if (! empty($_SERVER['HTTP_REFERER'])) {
1016 $location = generateLocation($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'], array('linksperpage'));
1017 } else {
1018 $location = '?';
1019 }
1020 header('Location: '. $location);
1016 exit; 1021 exit;
1017 } 1022 }
1018 1023
@@ -1024,7 +1029,12 @@ function renderPage($conf, $pluginManager, $LINKSDB)
1024 unset($_SESSION['privateonly']); // See all links 1029 unset($_SESSION['privateonly']); // See all links
1025 } 1030 }
1026 1031
1027 header('Location: '. generateLocation($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'], array('privateonly'))); 1032 if (! empty($_SERVER['HTTP_REFERER'])) {
1033 $location = generateLocation($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'], array('privateonly'));
1034 } else {
1035 $location = '?';
1036 }
1037 header('Location: '. $location);
1028 exit; 1038 exit;
1029 } 1039 }
1030 1040
@@ -1361,7 +1371,7 @@ function renderPage($conf, $pluginManager, $LINKSDB)
1361 ) { 1371 ) {
1362 if (isset($_POST['returnurl'])) { 1372 if (isset($_POST['returnurl'])) {
1363 $location = $_POST['returnurl']; // Handle redirects given by the form 1373 $location = $_POST['returnurl']; // Handle redirects given by the form
1364 } else { 1374 } else if (isset($_SERVER['HTTP_REFERER'])) {
1365 $location = generateLocation($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'], array('delete_link')); 1375 $location = generateLocation($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'], array('delete_link'));
1366 } 1376 }
1367 } 1377 }