mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-17 02:41:02 +01:00
Fix custom field order renumbering to keep at multiples of 10, and handle cached custom fields
This commit is contained in:
parent
966e574c42
commit
b16047bde2
@ -370,9 +370,10 @@ class egw_customfields implements IteratorAggregate
|
|||||||
if($cf['id'])
|
if($cf['id'])
|
||||||
{
|
{
|
||||||
$cfs = egw_customfields::get($cf['app'], true);
|
$cfs = egw_customfields::get($cf['app'], true);
|
||||||
$old = $cfs[$cf['id']];
|
$old = $cfs[$cf['name']];
|
||||||
if($old['order'] != $cf['order'])
|
if($old['order'] != $cf['order'] || $cf['order'] % 10 !== 0)
|
||||||
{
|
{
|
||||||
|
$cfs[$cf['name']]['order'] = $cf['order'];
|
||||||
uasort($cfs, function($a1, $a2){
|
uasort($cfs, function($a1, $a2){
|
||||||
return $a1['order'] - $a2['order'];
|
return $a1['order'] - $a2['order'];
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user