Bug 17284 - Patron details page ( moremember.pl ) show logged in library as patron...
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 9 Sep 2016 14:24:31 +0000 (14:24 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Mon, 12 Sep 2016 09:04:43 +0000 (09:04 +0000)
The patron details page always show the logged in library as the
patron's home library instead of the true home library. This bug is
particular to moremember.pl and does not affect other patron pages.

Test Plan:
1) Find a patron with a home library other than the logged in library
2) Note the patron home library as shown on moremember.pl matches
   the logged in library and not the patron's true home library
3) Apply this patch
4) Reload moremember.pl, the correct home library should display!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
members/moremember.pl

index 7aa57be..8212451 100644 (file)
@@ -33,7 +33,7 @@
 var interface = "[% interface %]";
 var theme = "[% theme %]";
 var borrowernumber = "[% borrowernumber %]";
-var branchcode = "[% branch %]";
+var branchcode = "[% Branches.GetLoggedInBranchcode() %]";
 var exports_enabled = "[% exports_enabled %]";
 var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 %]
 var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 %];
index 50a72f5..9f3ae74 100755 (executable)
@@ -269,8 +269,6 @@ if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preferen
 my $patron_image = Koha::Patron::Images->find($data->{borrowernumber});
 $template->param( picture => 1 ) if $patron_image;
 
-my $branch=C4::Context->userenv->{'branch'};
-
 $template->param(%$data);
 
 if (C4::Context->preference('ExtendedPatronAttributes')) {
@@ -319,8 +317,6 @@ $template->param(
     othernames      => $data->{'othernames'},
     categoryname    => $data->{'description'},
     was_renewed     => scalar $input->param('was_renewed') ? 1 : 0,
-    branch          => $branch,
-    branchcode      => $branch,
     todaysdate      => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
     totalprice      => sprintf("%.2f", $totalprice),
     totaldue        => sprintf("%.2f", $total),