Bug 25261: Prevent tests to fail if CircConfirmItemParts is on
[srvgit] / members / readingrec.pl
index 327c573..d484e69 100755 (executable)
@@ -29,7 +29,6 @@ use C4::Output;
 use C4::Members;
 use List::MoreUtils qw/any uniq/;
 use Koha::DateUtils;
-use C4::Members::Attributes qw(GetBorrowerAttributes);
 
 use Koha::Patrons;
 use Koha::Patron::Categories;
@@ -39,7 +38,6 @@ my $input = CGI->new;
 my ($template, $loggedinuser, $cookie)= get_template_and_user({template_name => "members/readingrec.tt",
                                query => $input,
                                type => "intranet",
-                               authnotrequired => 0,
                 flagsrequired => {borrowers => 'edit_borrowers'},
                                debug => 1,
                                });
@@ -55,7 +53,7 @@ if ($input->param('borrowernumber')) {
     $patron = Koha::Patrons->find( $borrowernumber );
 }
 
-my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
+my $logged_in_user = Koha::Patrons->find( $loggedinuser );
 output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
 
 my $order = 'date_due desc';
@@ -92,30 +90,13 @@ if ( $op eq 'export_barcodes' ) {
     }
 }
 
-my $category = $patron->category;
-if ( $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->categorycode )  if $patron_categories->count == 1;
-}
-
-$template->param( adultborrower => 1 ) if ( $category->category_type eq 'A' || $category->category_type eq 'I' );
 if (! $limit){
        $limit = 'full';
 }
 
-if (C4::Context->preference('ExtendedPatronAttributes')) {
-    my $attributes = GetBorrowerAttributes($patron->borrowernumber);
-    $template->param(
-        ExtendedPatronAttributes => 1,
-        extendedattributes => $attributes
-    );
-}
-
 $template->param(
     patron            => $patron,
     readingrecordview => 1,
-    is_child          => ( $category->category_type eq 'C' ),
     loop_reading      => $issues,
 );
 output_html_with_http_headers $input, $cookie, $template->output;