change to 7 to be close to extrafields + reverse doc
This commit is contained in:
parent
bd96609e2e
commit
7d4b459639
3 changed files with 6 additions and 5 deletions
|
|
@ -6158,9 +6158,9 @@ abstract class CommonObject
|
|||
//print $sql;
|
||||
|
||||
//fix #22571 : order by could be set
|
||||
//remember 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:Sortfield]]]]',
|
||||
if(isset($InfoFieldList[5]) && $InfoFieldList[5] != "") {
|
||||
$sql .= ' ORDER BY '.$InfoFieldList[5];
|
||||
//remember to be close to extrafields 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:CategoryIdType[:CategoryIdList[:Sortfield]]]]]]',
|
||||
if(isset($InfoFieldList[7]) && $InfoFieldList[7] != "") {
|
||||
$sql .= ' ORDER BY '.$InfoFieldList[7];
|
||||
} else {
|
||||
$sql .= ' ORDER BY '.implode(', ', $fields_label);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1153,6 +1153,7 @@ class ExtraFields
|
|||
// 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value
|
||||
// 5 : id category type
|
||||
// 6 : ids categories list separated by comma for category root
|
||||
// 7 : sort by (to be close to common object)
|
||||
$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
|
||||
|
||||
|
||||
|
|
@ -1327,6 +1328,7 @@ class ExtraFields
|
|||
// 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value
|
||||
// 5 : id category type
|
||||
// 6 : ids categories list separated by comma for category root
|
||||
// 7 : sort by (to be close to common object)
|
||||
$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
|
||||
|
||||
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
|
||||
|
|
|
|||
|
|
@ -68,9 +68,8 @@ class MyObject extends CommonObject
|
|||
const STATUS_VALIDATED = 1;
|
||||
const STATUS_CANCELED = 9;
|
||||
|
||||
|
||||
/**
|
||||
* 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
|
||||
* 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:CategoryIdType[:CategoryIdList[:SortField]]]]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
|
||||
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
|
||||
* 'label' the translation key.
|
||||
* 'picto' is code of a picto to show before value in forms
|
||||
|
|
|
|||
Loading…
Reference in a new issue