Bugfix: prevent LinkFilter to work on outdated data.
This commit is contained in:
parent
25d88c90aa
commit
55d0a5c445
2 changed files with 5 additions and 9 deletions
|
@ -62,11 +62,6 @@ class LinkDB implements Iterator, Countable, ArrayAccess
|
|||
// link redirector set in user settings.
|
||||
private $_redirector;
|
||||
|
||||
/**
|
||||
* @var LinkFilter instance.
|
||||
*/
|
||||
private $linkFilter;
|
||||
|
||||
/**
|
||||
* Creates a new LinkDB
|
||||
*
|
||||
|
@ -85,7 +80,6 @@ class LinkDB implements Iterator, Countable, ArrayAccess
|
|||
$this->_redirector = $redirector;
|
||||
$this->_checkDB();
|
||||
$this->_readDB();
|
||||
$this->linkFilter = new LinkFilter($this->_links);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -349,9 +343,11 @@ You use the community supported version of the original Shaarli project, by Seba
|
|||
*
|
||||
* @return array filtered links
|
||||
*/
|
||||
public function filter($type, $request, $casesensitive = false, $privateonly = false) {
|
||||
public function filter($type, $request, $casesensitive = false, $privateonly = false)
|
||||
{
|
||||
$linkFilter = new LinkFilter($this->_links);
|
||||
$requestFilter = is_array($request) ? implode(' ', $request) : $request;
|
||||
return $this->linkFilter->filter($type, trim($requestFilter), $casesensitive, $privateonly);
|
||||
return $linkFilter->filter($type, trim($requestFilter), $casesensitive, $privateonly);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
value="{function="implode(' ', $search_crits)"}"
|
||||
{/if}
|
||||
autocomplete="off" class="awesomplete" data-multiple data-minChars="1"
|
||||
data-list="{loop="$tags"}{$key}, {/loop}">
|
||||
data-list="{loop="$tags"}{$key}, {/loop}"
|
||||
>
|
||||
<input type="submit" value="Search" class="bigbutton">
|
||||
</form>
|
||||
|
|
Loading…
Reference in a new issue