mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX NegationFilter and SubstringFilter did not set the DataModel on apply()
This commit is contained in:
parent
e22eaec204
commit
671c8b734d
1
search/filters/NegationFilter.php
Normal file → Executable file
1
search/filters/NegationFilter.php
Normal file → Executable file
@ -8,6 +8,7 @@
|
||||
class NegationFilter extends SearchFilter {
|
||||
|
||||
public function apply(DataQuery $query) {
|
||||
$this->model = $query->applyRelation($this->relation);
|
||||
return $query->where(sprintf(
|
||||
"%s != '%s'",
|
||||
$this->getDbName(),
|
||||
|
1
search/filters/SubstringFilter.php
Normal file → Executable file
1
search/filters/SubstringFilter.php
Normal file → Executable file
@ -13,6 +13,7 @@
|
||||
class SubstringFilter extends SearchFilter {
|
||||
|
||||
public function apply(DataQuery $query) {
|
||||
$this->model = $query->applyRelation($this->relation);
|
||||
return $query->where(sprintf(
|
||||
"LOCATE('%s', %s) != 0",
|
||||
Convert::raw2sql($this->getValue()),
|
||||
|
Loading…
Reference in New Issue
Block a user