MINOR fixing MultiFormObjectDecorator.php to work on PG

This commit is contained in:
Peter Thaleikis 2015-12-01 23:15:02 +13:00
parent 7ae2e938dc
commit ffa50b1f48

View File

@ -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'");
}
}