Changing version number 3.0.5
[koha.git] / members / member.pl
index 349c0d7..13daa0d 100755 (executable)
@@ -55,6 +55,16 @@ if($quicksearch){
                  });
 }
 my $theme = $input->param('theme') || "default";
+
+
+$template->param( 
+        "AddPatronLists_".C4::Context->preference("AddPatronLists")=> "1",
+            );
+if (C4::Context->preference("AddPatronLists")=~/code/){
+    my $categories=GetBorrowercategoryList;
+    $categories->[0]->{'first'}=1;
+    $template->param(categories=>$categories);  
+}  
             # only used if allowthemeoverride is set
 #my %tmpldata = pathtotemplate ( template => 'member.tmpl', theme => $theme, language => 'fi' );
     # FIXME - Error-checking
@@ -62,7 +72,6 @@ my $theme = $input->param('theme') || "default";
 #                   die_on_bad_params => 0,
 #                   loop_context_vars => 1 );
 
-
 my $member=$input->param('member');
 my $orderby=$input->param('orderby');
 $orderby = "surname,firstname" unless $orderby;
@@ -110,6 +119,7 @@ for (my $i=($startfrom-1)*$resultsperpage; $i < $to; $i++){
     borrowernotes => $results->[$i]{'borrowernotes'},
     sort1 => $results->[$i]{'sort1'},
     sort2 => $results->[$i]{'sort2'},
+    dateexpiry => C4::Dates->new($results->[$i]{'dateexpiry'},'iso')->output('syspref'),
     );
   if ( $toggle ) { $toggle = 0; } else {$toggle = 1; }
   push(@resultsdata, \%row);
@@ -128,7 +138,7 @@ my $base_url =
 
 $template->param(
     paginationbar => pagination_bar(
-        $base_url,  int( $count / $resultsperpage ) + 1,
+        $base_url,  int( ($count - 1) / $resultsperpage ) + 1,
         $startfrom, 'startfrom'
     ),
     startfrom => $startfrom,