- // 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;
+ // Search for untagged links
+ if (isset($this->userInput['searchtags']) && empty($this->userInput['searchtags'])) {
+ $this->userInput['searchtags'] = false;