BUGFIX Disabled assumption that SQLQuery->filtersOnID() should only kick in when exactly one WHERE clause is given - this is very fragile and hard to test. It would return TRUE on $where = "SiteTree.ID = 5", but not on $where = array("Lang = 'de'", "SiteTree.ID = 5")

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70138 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-01-14 04:00:30 +00:00
parent 196286a6c2
commit cb8308513b

View File

@ -406,7 +406,7 @@ class SQLQuery extends Object {
function filtersOnID() {
return (
$this->where
&& count($this->where) == 1
//&& count($this->where) == 1
&& preg_match('/^(.*\.)?("|`)?ID("|`)?\s?=/', $this->where[0])
);
}