From ef18c784b5b72c80fdbabb12b97898ca924d0d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20Cesar=20Laura=20Avenda=C3=B1o?= Date: Fri, 14 Jul 2023 14:27:54 +0000 Subject: [PATCH] PMCORE-4256 A field that uses SQL in a dynaform does not allow routing the case --- gulliver/system/class.form.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gulliver/system/class.form.php b/gulliver/system/class.form.php index 97816346c..26f7bff20 100644 --- a/gulliver/system/class.form.php +++ b/gulliver/system/class.form.php @@ -364,7 +364,7 @@ class Form extends XmlForm } //We do the query to the external connection and we've got the label - $con = Propel::getConnection(($this->fields[$k]->sqlConnection != "") ? $this->fields[$k]->sqlConnection : "workflow"); + $con = Propel::getConnection(!empty($this->fields[$k]->sqlConnection) ? $this->fields[$k]->sqlConnection : "workflow"); $stmt = $con->prepareStatement($query); $rs = $stmt->executeQuery(ResultSet::FETCHMODE_NUM); @@ -402,7 +402,7 @@ class Form extends XmlForm if ($query != '') { // execute just if a query was set, it should be not empty //we do the query to the external connection and we've got the label - $con = Propel::getConnection( $this->fields[$k]->sqlConnection != "" ? $this->fields[$k]->sqlConnection : "workflow" ); //use default connection workflow if connection is not defined. Same as Dynaforms + $con = Propel::getConnection( !empty($this->fields[$k]->sqlConnection) ? $this->fields[$k]->sqlConnection : "workflow" ); //use default connection workflow if connection is not defined. Same as Dynaforms $stmt = $con->prepareStatement( $query ); @@ -442,7 +442,7 @@ class Form extends XmlForm } //we do the query to the external connection and we've got the label - $con = Propel::getConnection( $this->fields[$k]->sqlConnection != "" ? $this->fields[$k]->sqlConnection : "workflow" ); + $con = Propel::getConnection( !empty($this->fields[$k]->sqlConnection) ? $this->fields[$k]->sqlConnection : "workflow" ); $stmt = $con->prepareStatement( $query ); $rs = $stmt->executeQuery( ResultSet::FETCHMODE_NUM ); while ($rs->next()) {