From ffa50b1f4834a27f5bfaf627f21214bd5e25904c Mon Sep 17 00:00:00 2001 From: Peter Thaleikis Date: Tue, 1 Dec 2015 23:15:02 +1300 Subject: [PATCH] MINOR fixing MultiFormObjectDecorator.php to work on PG --- code/extensions/MultiFormObjectDecorator.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/extensions/MultiFormObjectDecorator.php b/code/extensions/MultiFormObjectDecorator.php index 6d6e335..3168538 100644 --- a/code/extensions/MultiFormObjectDecorator.php +++ b/code/extensions/MultiFormObjectDecorator.php @@ -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'"); } }