aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/Updater.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-12-16 12:36:59 +0100
committerArthurHoaro <arthur@hoa.ro>2017-12-16 14:32:56 +0100
commit9d4736a3e95332198896f97ecc8a83abb0cbe85b (patch)
treefc2487dbefd09953f21f8d10850c7689c87af224 /application/Updater.php
parent877491b4ad0a6a9119e667901cef40cc56116901 (diff)
downloadShaarli-9d4736a3e95332198896f97ecc8a83abb0cbe85b.tar.gz
Shaarli-9d4736a3e95332198896f97ecc8a83abb0cbe85b.tar.zst
Shaarli-9d4736a3e95332198896f97ecc8a83abb0cbe85b.zip
Add a filter to only display public links
When the key filter is clicked once, it only displays private link. When it is clicked on again, it becomes red and only public links are displayed. Another click and all links are displayed. The current visibility status is shown in the search banner Fixes #1030
Diffstat (limited to 'application/Updater.php')
-rw-r--r--application/Updater.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/application/Updater.php b/application/Updater.php
index 8d2bd577..f07e7697 100644
--- a/application/Updater.php
+++ b/application/Updater.php
@@ -445,6 +445,18 @@ class Updater
445 $this->linkDB->save($this->conf->get('resource.page_cache')); 445 $this->linkDB->save($this->conf->get('resource.page_cache'));
446 return true; 446 return true;
447 } 447 }
448
449 /**
450 * Change privateonly session key to visibility.
451 */
452 public function updateMethodVisibilitySession()
453 {
454 if (isset($_SESSION['privateonly'])) {
455 unset($_SESSION['privateonly']);
456 $_SESSION['visibility'] = 'private';
457 }
458 return true;
459 }
448} 460}
449 461
450/** 462/**