MINOR Fixed reference to fieldExists() on SearchFilter which was removed from DataObject (from r93738)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93939 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-30 00:44:09 +00:00
parent 3216c96a69
commit a0092fb348

View File

@ -128,7 +128,7 @@ abstract class SearchFilter extends Object {
// Todo: move to somewhere more appropriate, such as DataMapper, the magical class-to-be?
$candidateClass = $this->model;
while($candidateClass != 'DataObject') {
if(singleton($candidateClass)->fieldExists($this->name)) break;
if(singleton($candidateClass)->hasField($this->name)) break;
$candidateClass = get_parent_class($candidateClass);
}
if($candidateClass == 'DataObject') user_error("Couldn't find field $this->name in any of $this->model's tables.", E_USER_ERROR);