From db5bc961b472979d06755df239be58c237f9eea7 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Mon, 2 May 2022 14:46:03 +0200 Subject: [PATCH] NEW: Can use current entity filter on 'chkbxlst' --- htdocs/core/class/extrafields.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 85f0de5de90..127a54b0a28 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1147,7 +1147,7 @@ class ExtraFields $sql = "SELECT ".$keyList; $sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0]; if (!empty($InfoFieldList[4])) { - // can use curent entity filter + // can use current entity filter if (strpos($InfoFieldList[4], '$ENTITY$') !== false) { $InfoFieldList[4] = str_replace('$ENTITY$', $conf->entity, $InfoFieldList[4]); } @@ -1315,6 +1315,10 @@ class ExtraFields $sql = "SELECT ".$keyList; $sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0]; if (!empty($InfoFieldList[4])) { + // can use current entity filter + if (strpos($InfoFieldList[4], '$ENTITY$') !== false) { + $InfoFieldList[4] = str_replace('$ENTITY$', $conf->entity, $InfoFieldList[4]); + } // can use SELECT request if (strpos($InfoFieldList[4], '$SEL$') !== false) { $InfoFieldList[4] = str_replace('$SEL$', 'SELECT', $InfoFieldList[4]);