Bug 32603: Suggester category in Suggestions management
[srvgit] / members / holdshistory.pl
index 1983a35..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,12 +72,6 @@ if ( $borrowernumber eq C4::Context->preference('AnonymousPatron') ){
     }
 }
 
-if ( $patron->is_child) {
-    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->categorycode )  if $patron_categories->count == 1;
-}
-
 $template->param(
     holdshistoryview => 1,
     patron           => $patron,