aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/LinkDB.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-01-16 13:57:11 +0100
committerArthurHoaro <arthur@hoa.ro>2017-01-16 13:57:11 +0100
commit7f96d9ec21a95cb85d0292b46e18235b20efbcb2 (patch)
tree7fbedb066b3eef2d3951935806069b2236effb83 /application/LinkDB.php
parentae7f6b9d09c0f3e31d64e6c8a9804d5ab0c62eae (diff)
downloadShaarli-7f96d9ec21a95cb85d0292b46e18235b20efbcb2.tar.gz
Shaarli-7f96d9ec21a95cb85d0292b46e18235b20efbcb2.tar.zst
Shaarli-7f96d9ec21a95cb85d0292b46e18235b20efbcb2.zip
Update LinkFilter to be able to filter only public links
No update regarding the UI or the API for now Fixes #758
Diffstat (limited to 'application/LinkDB.php')
-rw-r--r--application/LinkDB.php6
1 files changed, 3 insertions, 3 deletions
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
443 * - searchtags: list of tags 443 * - searchtags: list of tags
444 * - searchterm: term search 444 * - searchterm: term search
445 * @param bool $casesensitive Optional: Perform case sensitive filter 445 * @param bool $casesensitive Optional: Perform case sensitive filter
446 * @param bool $privateonly Optional: Returns private links only if true. 446 * @param string $visibility return only all/private/public links
447 * 447 *
448 * @return array filtered links, all links if no suitable filter was provided. 448 * @return array filtered links, all links if no suitable filter was provided.
449 */ 449 */
450 public function filterSearch($filterRequest = array(), $casesensitive = false, $privateonly = false) 450 public function filterSearch($filterRequest = array(), $casesensitive = false, $visibility = 'all')
451 { 451 {
452 // Filter link database according to parameters. 452 // Filter link database according to parameters.
453 $searchtags = !empty($filterRequest['searchtags']) ? escape($filterRequest['searchtags']) : ''; 453 $searchtags = !empty($filterRequest['searchtags']) ? escape($filterRequest['searchtags']) : '';
@@ -475,7 +475,7 @@ You use the community supported version of the original Shaarli project, by Seba
475 } 475 }
476 476
477 $linkFilter = new LinkFilter($this); 477 $linkFilter = new LinkFilter($this);
478 return $linkFilter->filter($type, $request, $casesensitive, $privateonly); 478 return $linkFilter->filter($type, $request, $casesensitive, $visibility);
479 } 479 }
480 480
481 /** 481 /**