summaryrefslogtreecommitdiffstats
path: root/modules-available/passthrough/hooks/locations-column.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2021-12-17 11:30:37 +0100
committerSimon Rettberg2021-12-17 11:30:37 +0100
commitfbb5e1594e15d16dbec6265cb006cdeca22ae978 (patch)
tree7aca2e403d23eea7cfaf9acb74156f32cee17f9d /modules-available/passthrough/hooks/locations-column.inc.php
parent[statistics] Fix query building (diff)
downloadslx-admin-fbb5e1594e15d16dbec6265cb006cdeca22ae978.tar.gz
slx-admin-fbb5e1594e15d16dbec6265cb006cdeca22ae978.tar.xz
slx-admin-fbb5e1594e15d16dbec6265cb006cdeca22ae978.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.php10
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