aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/index.php b/index.php
index 60ac24ac..8770b669 100644
--- a/index.php
+++ b/index.php
@@ -1012,11 +1012,21 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager)
1012 1012
1013 // -------- User wants to see only private links (toggle) 1013 // -------- User wants to see only private links (toggle)
1014 if (isset($_GET['visibility'])) { 1014 if (isset($_GET['visibility'])) {
1015 unset($_SESSION['visibility']);
1016 if ($_GET['visibility'] === 'private') { 1015 if ($_GET['visibility'] === 'private') {
1017 $_SESSION['visibility'] = 'private'; // See only private links 1016 // Visibility not set or not already private, set private, otherwise reset it
1017 if (empty($_SESSION['visibility']) || $_SESSION['visibility'] !== 'private') {
1018 // See only private links
1019 $_SESSION['visibility'] = 'private';
1020 } else {
1021 unset($_SESSION['visibility']);
1022 }
1018 } else if ($_GET['visibility'] === 'public') { 1023 } else if ($_GET['visibility'] === 'public') {
1019 $_SESSION['visibility'] = 'public'; // See only public links 1024 if (empty($_SESSION['visibility']) || $_SESSION['visibility'] !== 'public') {
1025 // See only public links
1026 $_SESSION['visibility'] = 'public';
1027 } else {
1028 unset($_SESSION['visibility']);
1029 }
1020 } 1030 }
1021 1031
1022 if (! empty($_SERVER['HTTP_REFERER'])) { 1032 if (! empty($_SERVER['HTTP_REFERER'])) {