mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX #3798 ajshort: Let searchcontext be used on sitetree (merged r73758)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73760 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
496ada9c9d
commit
cedee5705f
@ -108,7 +108,7 @@ class SearchContext extends Object {
|
||||
if($existingQuery) {
|
||||
$query = $existingQuery;
|
||||
} else {
|
||||
$query = $model->extendedSQL();
|
||||
$query = $model->buildSQL();
|
||||
}
|
||||
|
||||
$SQL_limit = Convert::raw2sql($limit);
|
||||
@ -139,6 +139,8 @@ class SearchContext extends Object {
|
||||
$query->connective = $this->connective;
|
||||
$query->distinct = true;
|
||||
|
||||
$model->extend('augmentSQL', $query);
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ abstract class SearchFilter extends Object {
|
||||
}
|
||||
if($candidateClass == 'DataObject') user_error("Couldn't find field $this->name in any of $this->model's tables.", E_USER_ERROR);
|
||||
|
||||
return $candidateClass . "." . $this->name;
|
||||
return "\"$candidateClass\".\"$this->name\"";
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user