mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
196286a6c2
commit
cb8308513b
@ -406,7 +406,7 @@ class SQLQuery extends Object {
|
|||||||
function filtersOnID() {
|
function filtersOnID() {
|
||||||
return (
|
return (
|
||||||
$this->where
|
$this->where
|
||||||
&& count($this->where) == 1
|
//&& count($this->where) == 1
|
||||||
&& preg_match('/^(.*\.)?("|`)?ID("|`)?\s?=/', $this->where[0])
|
&& preg_match('/^(.*\.)?("|`)?ID("|`)?\s?=/', $this->where[0])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user