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.
|
// link redirector set in user settings.
|
||||||
private $_redirector;
|
private $_redirector;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var LinkFilter instance.
|
|
||||||
*/
|
|
||||||
private $linkFilter;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new LinkDB
|
* Creates a new LinkDB
|
||||||
*
|
*
|
||||||
|
@ -85,7 +80,6 @@ function __construct($datastore, $isLoggedIn, $hidePublicLinks, $redirector = ''
|
||||||
$this->_redirector = $redirector;
|
$this->_redirector = $redirector;
|
||||||
$this->_checkDB();
|
$this->_checkDB();
|
||||||
$this->_readDB();
|
$this->_readDB();
|
||||||
$this->linkFilter = new LinkFilter($this->_links);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -349,9 +343,11 @@ public function getLinkFromUrl($url)
|
||||||
*
|
*
|
||||||
* @return array filtered links
|
* @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;
|
$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)"}"
|
value="{function="implode(' ', $search_crits)"}"
|
||||||
{/if}
|
{/if}
|
||||||
autocomplete="off" class="awesomplete" data-multiple data-minChars="1"
|
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">
|
<input type="submit" value="Search" class="bigbutton">
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in a new issue