BUGFIX NegationFilter and SubstringFilter did not set the DataModel on apply()

This commit is contained in:
Stig Lindqvist 2011-12-09 12:49:24 +01:00 committed by Sam Minnee
parent e22eaec204
commit 671c8b734d
2 changed files with 2 additions and 0 deletions

1
search/filters/NegationFilter.php Normal file → Executable file
View 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
View 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()),