From: Jeff Godin Date: Thu, 22 May 2014 17:12:32 +0000 (-0400) Subject: Set $ctx->{my_bookbag} if we own the bookbag X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=83e95534b7ab7d57ca59f6b0d4b2cce732f900c1;p=evergreen%2Ftadl.git Set $ctx->{my_bookbag} if we own the bookbag Set $ctx->{my_bookbag} if we are viewing a bookbag and we are the owner of the bookbag. Signed-off-by: Jeff Godin --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm index 9ea57ecd06..1cdc93cdce 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm @@ -482,6 +482,11 @@ sub load_rresults { my $fetch_recs = $rec_ids; + # Set a clue if we are searching for a bookbag that is owned by the current user + if ($ctx->{bookbag} && $ctx->{user}) { + $ctx->{my_bookbag} = 1 if ($ctx->{bookbag}->owner eq $ctx->{user}->id); + } + $self->timelog("Calling get_records_and_facets()"); my ($facets, @data) = $self->get_records_and_facets( $fetch_recs, $results->{facet_key},