Skip to content

Commit fa05cd8

Browse files
committed
fix: don't re-sort settings when adding / removing
1 parent ba605c6 commit fa05cd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_build/resolvers/resolve.update.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function addToSetting($modx, $key, $add, $separator = ' ')
2525
if ($setting && strpos($setting->get('value'), $add) === false) {
2626
$array = explode($separator, $setting->get('value'));
2727
$array[] = $add;
28-
sort($array);
28+
//sort($array);
2929
$setting->set('value', implode(' ', $array));
3030
$setting->save();
3131
}
@@ -48,7 +48,7 @@ function removeFromSetting($modx, $key, $remove, $separator = ' ')
4848
if ($setting && strpos($setting->get('value'), $remove) !== false) {
4949
$array = explode($separator, $setting->get('value'));
5050
$array = array_diff($array, [$remove]);
51-
sort($array);
51+
//sort($array);
5252
$setting->set('value', implode(' ', $array));
5353
$setting->save();
5454
}

0 commit comments

Comments
 (0)