X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=application%2FFeedBuilder.php;h=ddefe6ce93a83ed8f6869d1eee57941264731e72;hb=90f12b12ca9a828e2aaf2535c09ec9c73ff1e2a6;hp=50e0983152484a3e9fc53d06dd15f62debe60b7e;hpb=82e3680203896f024958ae969e2c4fccee9682f4;p=github%2Fshaarli%2FShaarli.git diff --git a/application/FeedBuilder.php b/application/FeedBuilder.php index 50e09831..ddefe6ce 100644 --- a/application/FeedBuilder.php +++ b/application/FeedBuilder.php @@ -103,23 +103,7 @@ class FeedBuilder public function buildData() { // Optionally filter the results: - $searchtags = !empty($this->userInput['searchtags']) ? escape($this->userInput['searchtags']) : ''; - $searchterm = !empty($this->userInput['searchterm']) ? escape($this->userInput['searchterm']) : ''; - if (! empty($searchtags) && ! empty($searchterm)) { - $linksToDisplay = $this->linkDB->filter( - LinkFilter::$FILTER_TAG | LinkFilter::$FILTER_TEXT, - array($searchtags, $searchterm) - ); - } - elseif ($searchtags) { - $linksToDisplay = $this->linkDB->filter(LinkFilter::$FILTER_TAG, $searchtags); - } - elseif ($searchterm) { - $linksToDisplay = $this->linkDB->filter(LinkFilter::$FILTER_TEXT, $searchterm); - } - else { - $linksToDisplay = $this->linkDB; - } + $linksToDisplay = $this->linkDB->filterSearch($this->userInput); $nblinksToDisplay = $this->getNbLinks(count($linksToDisplay));