Update commonobject.class.php

This commit is contained in:
Laurent Destailleur
2023-10-06 01:41:44 +02:00
committed by GitHub
parent c3a9ba5506
commit 9deebe63d8

View File

@@ -7102,7 +7102,7 @@ abstract class CommonObject
//print $sql; //print $sql;
// Note: $InfoFieldList can be 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:CategoryIdType[:CategoryIdList[:Sortfield]]]]]]' // 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]) { if (isset($InfoFieldList[7]) && preg_match('/^[a-z0-9_-,]+$/i', $InfoFieldList[7])) {
$sql .= " ORDER BY ".$this->db->escape($InfoFieldList[7]); $sql .= " ORDER BY ".$this->db->escape($InfoFieldList[7]);
} else { } else {
$sql .= " ORDER BY ".$this->db->sanitize(implode(', ', $fields_label)); $sql .= " ORDER BY ".$this->db->sanitize(implode(', ', $fields_label));