aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorVirtualTam <virtualtam+github@flibidi.net>2017-08-03 16:27:59 +0200
committerGitHub <noreply@github.com>2017-08-03 16:27:59 +0200
commitf09e1e318e0b1c72aa659c20b715be508009175f (patch)
tree68d84f2583d5aa799128e3ec418e20eda4ba2c5f /index.php
parentf5568f87b1a23b36f8d3623aacfbb810d1d60dc0 (diff)
parentf210d94f716acd86fd22c9651f591a778490e8a9 (diff)
downloadShaarli-f09e1e318e0b1c72aa659c20b715be508009175f.tar.gz
Shaarli-f09e1e318e0b1c72aa659c20b715be508009175f.tar.zst
Shaarli-f09e1e318e0b1c72aa659c20b715be508009175f.zip
Merge pull request #889 from Lucas-C/master
Using only one form in linklist.html - fix #885
Diffstat (limited to 'index.php')
-rw-r--r--index.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/index.php b/index.php
index 85486eb5..5c292b04 100644
--- a/index.php
+++ b/index.php
@@ -287,6 +287,7 @@ function logout() {
287 unset($_SESSION['ip']); 287 unset($_SESSION['ip']);
288 unset($_SESSION['username']); 288 unset($_SESSION['username']);
289 unset($_SESSION['privateonly']); 289 unset($_SESSION['privateonly']);
290 unset($_SESSION['untaggedonly']);
290 } 291 }
291 setcookie('shaarli_staySignedIn', FALSE, 0, WEB_PATH); 292 setcookie('shaarli_staySignedIn', FALSE, 0, WEB_PATH);
292} 293}
@@ -1017,6 +1018,19 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history)
1017 exit; 1018 exit;
1018 } 1019 }
1019 1020
1021 // -------- User wants to see only untagged links (toggle)
1022 if (isset($_GET['untaggedonly'])) {
1023 $_SESSION['untaggedonly'] = !$_SESSION['untaggedonly'];
1024
1025 if (! empty($_SERVER['HTTP_REFERER'])) {
1026 $location = generateLocation($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'], array('untaggedonly'));
1027 } else {
1028 $location = '?';
1029 }
1030 header('Location: '. $location);
1031 exit;
1032 }
1033
1020 // -------- Handle other actions allowed for non-logged in users: 1034 // -------- Handle other actions allowed for non-logged in users:
1021 if (!isLoggedIn()) 1035 if (!isLoggedIn())
1022 { 1036 {
@@ -1651,7 +1665,7 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager)
1651 'searchtags' => $searchtags, 1665 'searchtags' => $searchtags,
1652 'searchterm' => $searchterm, 1666 'searchterm' => $searchterm,
1653 ]; 1667 ];
1654 $linksToDisplay = $LINKSDB->filterSearch($request, false, $visibility); 1668 $linksToDisplay = $LINKSDB->filterSearch($request, false, $visibility, !empty($_SESSION['untaggedonly']));
1655 } 1669 }
1656 1670
1657 // ---- Handle paging. 1671 // ---- Handle paging.