From 94bfa4249f1d2c4480cc5cc45b78307f25151aec Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Fri, 20 Dec 2013 12:58:50 -0500 Subject: [PATCH] Bug fix to recognize user's default pickup library for holds when they are logged in. --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm index 77a7eae6a1..c50e1dd24b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm @@ -79,6 +79,8 @@ sub load_getit { return $self->save_item_to_bookbag($rec_id, $bbag_id) if $action eq 'save'; return $self->login_and_place_hold($rec_id) if $action eq 'hold'; + + # if the user is logged in, fetch his bookbags if ($ctx->{user}) { $ctx->{bookbags} = $self->editor->search_container_biblio_record_entry_bucket([ @@ -91,6 +93,15 @@ sub load_getit { ]); } + # If user is logged in and has a default pickup location, grab it + if ($ctx->{user}) { + my $set_map = $self->ctx->{user_setting_map}; + if ($$set_map{'opac.default_pickup_location'}) { + $ctx->{default_pickup_lib} = $$set_map{'opac.default_pickup_location'}; + } + } + + $self->ctx->{page} = 'getit'; # repair the page return Apache2::Const::OK; } -- 2.11.0