From 315a6888077ca4544bb3ecc0b2417bc8bed3bfdd Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 28 Sep 2006 13:30:14 +0000 Subject: [PATCH] updated folder retrieval to fetch shared folders that the requestor is within range of git-svn-id: svn://svn.open-ils.org/ILS/trunk@6247 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Reporter.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Reporter.pm b/Open-ILS/src/perlmods/OpenILS/Application/Reporter.pm index 36ff88b6f1..4c2fce9631 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Reporter.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Reporter.pm @@ -43,8 +43,16 @@ sub retrieve_visible_folders { my $meth = "search_reporter_${type}_folder"; my $fs = $e->$meth( { owner => $e->requestor->id } ); - # XXX fetch folders visible to me - + my @orgs; + my $oid = $e->requestor->ws_ou; + while( my ($o) = $U->fetch_org_unit($oid) ) { + last unless $o; + push( @orgs, $o->id ); + $oid = $o->parent_ou; + } + + my $fs2 = $e->$meth({shared => 't', share_with => \@orgs}); + push( @$fs, @$fs2); return $fs; } -- 2.11.0