Bug 16695: Require Exception::Class 1.38 instead of 1.39
[srvgit] / opac / opac-privacy.pl
index 51fc7cd..969c46a 100755 (executable)
@@ -24,6 +24,7 @@ use C4::Context;
 use C4::Circulation;
 use C4::Members;
 use C4::Output;
+use Koha::Patrons;
 
 my $query = new CGI;
 
@@ -74,15 +75,15 @@ elsif ( $op eq "delete_record" ) {
 }
 
 # get borrower privacy ....
-my $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber );
+my $borrower = Koha::Patrons->find( $borrowernumber );;
 
 $template->param(
-    'Ask_data'                         => 1,
-    'privacy' . $borrower->{'privacy'} => 1,
-    'privacyview'                      => 1,
-    'borrower'                         => $borrower,
-    'surname'                          => $borrower->{surname},
-    'firstname'                        => $borrower->{firstname},
+    'Ask_data'                       => 1,
+    'privacy' . $borrower->privacy() => 1,
+    'privacyview'                    => 1,
+    'borrower'                       => $borrower,
+    'surname'                        => $borrower->surname,
+    'firstname'                      => $borrower->firstname,
 );
 
 output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };