Merge pull request #8560 from atm-john/Fix_extrafield_list_from_table_entity

Fix extrafield entity query filter
This commit is contained in:
Laurent Destailleur 2018-04-11 17:31:36 +02:00 committed by GitHub
commit d7da83ebc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -944,6 +944,10 @@ class ExtraFields
$sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0];
if (!empty($InfoFieldList[4]))
{
// can use curent 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]);