Fix for bug 1791
[koha.git] / members / readingrec.pl
index 10e8919..3eac89c 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Output;
 use CGI;
 use C4::Members;
 
-use C4::Dates;
+use C4::Dates qw/format_date/;
 my $input=new CGI;
 
 
@@ -42,7 +42,7 @@ my $limit=$input->param('limit');
 
 if ($limit){
     if ($limit eq 'full'){
-       $limit=0;
+               $limit=0;
     }
 } 
 else {
@@ -79,8 +79,11 @@ for (my $i=0;$i<$count;$i++){
        my $borrowercategory = GetBorrowercategory( $data->{'categorycode'} );
        my $category_type = $borrowercategory->{'category_type'};
        ( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' );
-
+if (! $limit){ 
+       $limit = 'full'; 
+}
 $template->param(
+                                               readingrecordview => 1,
                                                biblionumber => $data->{'biblionumber'},
                                                title => $data->{'title'},
                                                initials => $data->{'initials'},