can filter on object properties

This commit is contained in:
Frédéric FRANCE
2024-10-16 11:56:49 +02:00
parent befaf262d9
commit 324fe1e7a7

View File

@@ -7829,7 +7829,6 @@ abstract class CommonObject
$sqlwhere .= " AND entity = " . ((int) $conf->entity);
}
$sql .= $sqlwhere;
//print $sql;
// Note: $InfoFieldList can be 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:CategoryIdType[:CategoryIdList[:Sortfield]]]]]]'
if (isset($InfoFieldList[7]) && preg_match('/^[a-z0-9_\-,]+$/i', $InfoFieldList[7])) {
@@ -7837,6 +7836,8 @@ abstract class CommonObject
} else {
$sql .= " ORDER BY ".$this->db->sanitize(implode(', ', $fields_label));
}
$sql .= ' LIMIT ' . getDolGlobalString('MAIN_EXTRAFIELDS_LIMIT_SELLIST_SQL', 1000);
// print $sql;
dol_syslog(get_class($this) . '::showInputField type=sellist', LOG_DEBUG);
$resql = $this->db->query($sql);