Bug 31028: Update patron and biblio includes to remove whitespace
[koha-ffzg.git] / members / holdshistory.pl
index 9d6f7a4..8564c09 100755 (executable)
@@ -19,8 +19,8 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Patrons;
 
@@ -33,9 +33,7 @@ my @all_holds;
 my ($template, $loggedinuser, $cookie)= get_template_and_user({template_name => "members/holdshistory.tt",
                 query => $input,
                 type => "intranet",
-                authnotrequired => 0,
-                flagsrequired => {borrowers => 1},
-                debug => 1,
+                flagsrequired => {borrowers => 'edit_borrowers'},
                 });
 
 my $patron;
@@ -74,21 +72,8 @@ if ( $borrowernumber eq C4::Context->preference('AnonymousPatron') ){
     }
 }
 
-if ( $patron->category->category_type eq 'C') {
-    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
-    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
-    $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
-}
-
-$template->param( adultborrower => 1 ) if ( $patron->category->category_type eq 'A' || $patron->category->category_type eq 'I' );
-
-$template->param( picture => 1 ) if $patron->image;
-
-$template->param(%{ $patron->unblessed });
-
 $template->param(
     holdshistoryview => 1,
-    borrowernumber   => $borrowernumber,
     patron           => $patron,
     holds            => \@all_holds,
 );