Bug 15988: Moving authority types actions into a drop-down menu
[koha.git] / members / member-flags.pl
index 1206f12..5bd2d07 100755 (executable)
@@ -17,6 +17,7 @@ use C4::Members::Attributes qw(GetBorrowerAttributes);
 #use C4::Acquisitions;
 
 use C4::Output;
+use Koha::Patron::Images;
 
 my $input = new CGI;
 
@@ -157,8 +158,8 @@ if ($input->param('newflags')) {
     }
        
 $template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' );
-    my ($picture, $dberror) = GetPatronImage($bor->{'borrowernumber'});
-    $template->param( picture => 1 ) if $picture;
+    my $patron_image = Koha::Patron::Images->find($bor->{borrowernumber});
+    $template->param( picture => 1 ) if $patron_image;
 
 if (C4::Context->preference('ExtendedPatronAttributes')) {
     my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
@@ -168,10 +169,6 @@ if (C4::Context->preference('ExtendedPatronAttributes')) {
     );
 }
 
-# Computes full borrower address
-my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $bor->{streettype} );
-my $address = $bor->{'streetnumber'} . " $roadtype " . $bor->{'address'};
-
 $template->param(
                borrowernumber => $bor->{'borrowernumber'},
     cardnumber => $bor->{'cardnumber'},
@@ -181,8 +178,9 @@ $template->param(
                categorycode => $bor->{'categorycode'},
                category_type => $bor->{'category_type'},
                categoryname => $bor->{'description'},
-        address => $address,
+        address => $bor->{address},
                address2 => $bor->{'address2'},
+        streettype => $bor->{streettype},
                city => $bor->{'city'},
         state => $bor->{'state'},
                zipcode => $bor->{'zipcode'},