Ver código fonte

Merge pull request #20762 from fappels/develop_chkbxlst_entity_filter

NEW: Can use current entity filter on 'chkbxlst'
Laurent Destailleur 3 anos atrás
pai
commit
c24c2015af
1 arquivos alterados com 5 adições e 1 exclusões
  1. 5 1
      htdocs/core/class/extrafields.class.php

+ 5 - 1
htdocs/core/class/extrafields.class.php

@@ -1149,7 +1149,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]);
 						}
@@ -1317,6 +1317,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]);