Bug 23051: (follow-up) Add renewal feedback and move code to subroutines and test
[koha-ffzg.git] / members / files.pl
index 4fc42fc..e35f7e9 100755 (executable)
@@ -24,12 +24,12 @@ use CGI qw ( -utf8 );
 use C4::Auth;
 use C4::Output;
 use C4::Members;
-use C4::Members::Attributes qw(GetBorrowerAttributes);
 use C4::Debug;
 
 use Koha::DateUtils;
 use Koha::Patrons;
 use Koha::Patron::Files;
+use Koha::Patron::Categories;
 
 my $cgi = CGI->new;
 
@@ -47,7 +47,7 @@ $template->param( 'borrower_files' => 1 );
 
 my $borrowernumber = $cgi->param('borrowernumber');
 
-my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
+my $logged_in_user = Koha::Patrons->find( $loggedinuser );
 my $patron         = Koha::Patrons->find($borrowernumber);
 output_and_exit_if_error( $cgi, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
 
@@ -106,18 +106,6 @@ else {
         $bf->DelFile( id => scalar $cgi->param('file_id') );
     }
 
-    if (C4::Context->preference('ExtendedPatronAttributes')) {
-        my $attributes = GetBorrowerAttributes($borrowernumber);
-        $template->param(
-            ExtendedPatronAttributes => 1,
-            extendedattributes => $attributes
-        );
-    }
-
-
-    $template->param( adultborrower => 1 )
-        if ( $patron_category->category_type eq 'A' || $patron_category->category_type eq 'I' );
-
     $template->param(
         files => Koha::Patron::Files->new( borrowernumber => $borrowernumber )
           ->GetFilesInfo(),