return [ values %{$cache{map}{aou}} ];
};
+ $ro_object_subs->{aouct_tree} = sub {
+
+ # fetch the org unit tree
+ unless(exists $cache{aouct_tree}) {
+ $cache{aouct_tree} = undef;
+
+ my $tree_id = $e->json_querysearch_actor_org_unit_custom_tree([
+ {purpose => 'opac', active => 't'},
+ {idlist => 1}
+ ])->[0];
+
+ if ($tree_id) {
+ $cache{aouct_tree} = $e->search_actor_org_unit_custom_tree_node([
+ { parent => undef, tree => $tree_id},
+ { flesh => -1,
+ flesh_fields => {aou => ['children']},
+ order_by => {aouctn => 'sibling_order'}
+ }
+ ])->[0];
+ }
+ }
+
+ return $cache{aouct_tree};
+ };
# turns an ISO date into something TT can understand
$ro_object_subs->{parse_datetime} = sub {