From 7f96d9ec21a95cb85d0292b46e18235b20efbcb2 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Mon, 16 Jan 2017 13:57:11 +0100 Subject: Update LinkFilter to be able to filter only public links No update regarding the UI or the API for now Fixes #758 --- application/LinkDB.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'application/LinkDB.php') diff --git a/application/LinkDB.php b/application/LinkDB.php index 1e13286a..4cee2af9 100644 --- a/application/LinkDB.php +++ b/application/LinkDB.php @@ -443,11 +443,11 @@ You use the community supported version of the original Shaarli project, by Seba * - searchtags: list of tags * - searchterm: term search * @param bool $casesensitive Optional: Perform case sensitive filter - * @param bool $privateonly Optional: Returns private links only if true. + * @param string $visibility return only all/private/public links * * @return array filtered links, all links if no suitable filter was provided. */ - public function filterSearch($filterRequest = array(), $casesensitive = false, $privateonly = false) + public function filterSearch($filterRequest = array(), $casesensitive = false, $visibility = 'all') { // Filter link database according to parameters. $searchtags = !empty($filterRequest['searchtags']) ? escape($filterRequest['searchtags']) : ''; @@ -475,7 +475,7 @@ You use the community supported version of the original Shaarli project, by Seba } $linkFilter = new LinkFilter($this); - return $linkFilter->filter($type, $request, $casesensitive, $privateonly); + return $linkFilter->filter($type, $request, $casesensitive, $visibility); } /** -- cgit v1.2.3