From 774b9857e6c7d5f715b09393c79196d018623f4c Mon Sep 17 00:00:00 2001 From: Jeff Godin Date: Thu, 22 May 2014 13:12:32 -0400 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm | 5 +++++ 1 file changed, 5 insertions(+) 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 9c5c6990d9..c2bc2454bf 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm @@ -454,6 +454,11 @@ sub load_rresults { $self->load_rresults_bookbag_item_notes($rec_ids) if $ctx->{bookbag}; + # 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( $rec_ids, $results->{facet_key}, -- 2.11.0