diff options
author | Simon Rettberg | 2021-12-17 11:30:37 +0100 |
---|---|---|
committer | Simon Rettberg | 2022-03-09 15:06:54 +0100 |
commit | ecb80fc2afed0407e9903023242a34e75fb7bde4 (patch) | |
tree | f57810f8572c91ffdb2dee51a4c10d83087a596b /modules-available/passthrough/hooks/locations-column.inc.php | |
parent | [eventlog] Add english translations (diff) | |
download | slx-admin-ecb80fc2afed0407e9903023242a34e75fb7bde4.tar.gz slx-admin-ecb80fc2afed0407e9903023242a34e75fb7bde4.tar.xz slx-admin-ecb80fc2afed0407e9903023242a34e75fb7bde4.zip |
[locations/passthrough] Make location assignment recusive
Properly show inherited passthough groups in location list,
disable inherited passthrough groups in selection dialog.
Diffstat (limited to 'modules-available/passthrough/hooks/locations-column.inc.php')
-rw-r--r-- | modules-available/passthrough/hooks/locations-column.inc.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules-available/passthrough/hooks/locations-column.inc.php b/modules-available/passthrough/hooks/locations-column.inc.php index 9757ac50..3d12a0f8 100644 --- a/modules-available/passthrough/hooks/locations-column.inc.php +++ b/modules-available/passthrough/hooks/locations-column.inc.php @@ -43,6 +43,16 @@ class PassthroughLocationColumn extends AbstractLocationColumn return true; } + public function propagationOverride(string $parent, string $data): string + { + if (empty($parent)) + return $data; + $merge = array_unique(array_merge( + explode(', ', $parent), explode(', ', $data))); + sort($merge); + return implode(', ', $merge); + } + } return new PassthroughLocationColumn($allowedLocationIds);
\ No newline at end of file |