#2771: Fix SQLQuery::filtersOnID() (wakeless)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@66225 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2008-11-19 04:11:37 +00:00 committed by Sam Minnee
parent 4c81b8c3a5
commit d76611f380

View File

@ -432,8 +432,8 @@ class SQLQuery extends Object {
* @return boolean
*/
function filtersOnID() {
return ($query->where && count($query->where) == 1 &&
(strpos($query->where[0], ".`ID` = ") || strpos($query->where[0], ".ID = ") || strpos($query->where[0], "ID = ") )
return ($this->where && count($this->where) == 1 &&
(strpos($this->where[0], ".`ID` = ") || strpos($this->where[0], ".ID = ") || strpos($this->where[0], "ID = ") )
);
}