mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 11:05:49 +02:00
MINOR fixing MultiFormObjectDecorator.php to work on PG
This commit is contained in:
parent
7ae2e938dc
commit
ffa50b1f48
@ -32,18 +32,18 @@ class MultiFormObjectDecorator extends DataExtension {
|
||||
$where = $query->getWhere();
|
||||
if(!$where && !$this->wantsTemporary($query)) {
|
||||
$from = array_values($query->getFrom());
|
||||
$query->addWhere("{$from[0]}.MultiFormIsTemporary = 0");
|
||||
$query->addWhere("{$from[0]}.\"MultiFormIsTemporary\" = '0'");
|
||||
return;
|
||||
}
|
||||
|
||||
if(
|
||||
strpos($where[0], ".`ID` = ") === false
|
||||
&& strpos($where[0], ".ID = ") === false
|
||||
strpos($where[0], ".`ID` = ") === false
|
||||
&& strpos($where[0], ".ID = ") === false
|
||||
&& strpos($where[0], "ID = ") !== 0
|
||||
&& !$this->wantsTemporary($query)
|
||||
) {
|
||||
$from = array_values($query->getFrom());
|
||||
$query->addWhere("{$from[0]}.MultiFormIsTemporary = 0");
|
||||
$query->addWhere("{$from[0]}.\"MultiFormIsTemporary\" = '0'");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user