BUGFIX: Fixed SQLQuery::filtersOnId

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66509 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-11-24 19:48:11 +00:00
parent 2e955b498e
commit 75a237cd01

View File

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