mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
New | Add AGENDA_SORT_EVENT_TYPE_BY_POSITION_FIRST hidden conf to change sort method of actions (#25375)
* Position defined in dictionnary must be main sort criterion The position defined in the dictionary must be the main sort criterion. * Use AGENDA_SORT_EVENT_TYPE_BY_POSITION_FIRST hidden conf to sort by position
This commit is contained in:
@@ -178,7 +178,13 @@ class CActionComm
|
||||
if ($morefilter) {
|
||||
$sql .= " AND ".$morefilter;
|
||||
}
|
||||
$sql .= " ORDER BY type, position, module";
|
||||
// If AGENDA_SORT_EVENT_TYPE_BY_POSITION_FIRST is defined, we use position as main sort criterion
|
||||
// otherwise we use type as main sort criterion
|
||||
if (!empty($conf->global->AGENDA_SORT_EVENT_TYPE_BY_POSITION_FIRST)) {
|
||||
$sql .= " ORDER BY position, type, module";
|
||||
} else {
|
||||
$sql .= " ORDER BY type, position, module";
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::liste_array", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
Reference in New Issue
Block a user