From 1600ecc9ecc94e98bdb657b6e874f1d28b51cbd0 Mon Sep 17 00:00:00 2001 From: Vaadasch Date: Sun, 28 Jul 2019 17:51:15 +0200 Subject: [PATCH] Change 0 and 1 to FALSE and TRUE for pgsql 0 and 1 are read as False and True by Mysql, but not by PGsql. FALSE and TRUE are correctly read by both => changing --- htdocs/core/class/extrafields.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 9e83a1d836b..cde9f993d48 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1445,13 +1445,13 @@ class ExtraFields $InfoFieldList[4] = str_replace('$ID$', '0', $InfoFieldList[4]); } else { if (!empty($matchCondition[1])) { - $boolCond = (($matchCondition[1] == "AND") ? ' AND 1 ' : ' OR 0 '); + $boolCond = (($matchCondition[1] == "AND") ? ' AND TRUE ' : ' OR FALSE '); $InfoFieldList[4] = str_replace($matchCondition[0], $boolCond . $matchCondition[3], $InfoFieldList[4]); } elseif (!empty($matchCondition[3])) { - $boolCond = (($matchCondition[3] == "AND") ? ' 1 AND ' : ' 0 OR'); + $boolCond = (($matchCondition[3] == "AND") ? ' TRUE AND ' : ' FALSE OR'); $InfoFieldList[4] = str_replace($matchCondition[0], $boolCond, $InfoFieldList[4]); } else { - $InfoFieldList[4] = 1; + $InfoFieldList[4] = " TRUE "; } }