From 844797459f7fcbb8ec5137bad85aa8dcd1c715b3 Mon Sep 17 00:00:00 2001 From: tipaul Date: Mon, 7 Apr 2003 14:05:24 +0000 Subject: [PATCH] fix for #187 --- C4/Reserves2.pm | 9 +++----- .../default/en/members/memberentry.tmpl | 10 ++++----- .../default/en/members/moremember.tmpl | 4 +++- .../intranet-tmpl/default/en/request.tmpl | 2 +- .../default/fr/members/moremember.tmpl | 16 ++++++++++++-- moremember.pl | 22 ++++++++----------- 6 files changed, 35 insertions(+), 28 deletions(-) diff --git a/C4/Reserves2.pm b/C4/Reserves2.pm index f5214734e1..93c480656c 100755 --- a/C4/Reserves2.pm +++ b/C4/Reserves2.pm @@ -146,8 +146,6 @@ sub FindReserves { $query.=" order by priority"; my $sth=$dbh->prepare($query); $sth->execute; - # FIXME - $i is unnecessary and bogus - my $i=0; my @results; while (my $data=$sth->fetchrow_hashref){ # FIXME - What is this if-statement doing? How do constraints work? @@ -173,12 +171,10 @@ sub FindReserves { $data->{$key} = $bdata->{$key}; } } - $results[$i]=$data; # FIXME - Use push @results - $i++; + push @results, $data; } -# print $query; $sth->finish; - return($i,\@results); + return($#results+1,\@results); } =item CheckReserves @@ -790,6 +786,7 @@ sub getreservetitle { = $bor and reserveconstraints.reservedate='$date' and reserveconstraints.timestamp=$timestamp"; my $sth=$dbh->prepare($query); + warn "q : $query"; $sth->execute; my $data=$sth->fetchrow_hashref; $sth->finish; diff --git a/koha-tmpl/intranet-tmpl/default/en/members/memberentry.tmpl b/koha-tmpl/intranet-tmpl/default/en/members/memberentry.tmpl index 232d9f6cb8..97168adedb 100644 --- a/koha-tmpl/intranet-tmpl/default/en/members/memberentry.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/members/memberentry.tmpl @@ -180,23 +180,23 @@ - FLAGS + FLAGS - >Yes - >No + >Yes + >No - + //images/2rightarrow.png" ALT="Add New Member" border=0 > - + diff --git a/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl index 4b281c74bb..df9c5e9cd1 100644 --- a/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl @@ -193,7 +193,9 @@ - /images/cancel-requests.gif"> + + /images/cancel-requests.gif"> + diff --git a/koha-tmpl/intranet-tmpl/default/en/request.tmpl b/koha-tmpl/intranet-tmpl/default/en/request.tmpl index 297a131600..86038dcb91 100644 --- a/koha-tmpl/intranet-tmpl/default/en/request.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/request.tmpl @@ -105,7 +105,7 @@ - > + > > /images/cancel-requests.gif"> - + + /images/cancel-requests.gif"> + + + + + + +
+

+ ">/images/reading-record.gif"> +

+
+

">/images/reading-record.gif">

diff --git a/moremember.pl b/moremember.pl index deacfe7bdb..ab3bfc7172 100755 --- a/moremember.pl +++ b/moremember.pl @@ -184,20 +184,16 @@ for (my $i=0;$i<$count;$i++){ my ($rescount,$reserves)=FindReserves('',$bornum); #From C4::Reserves2 -# FIXME -# does it make sense to turn this into a foreach my $i (0..$rescount) -# kind of loop? -# my @reservedata; -for (my $i=0;$i<$rescount;$i++){ - $reserves->[$i]{'reservedate2'} = format_date($reserves->[$i]{'reservedate'}); - my $restitle; - my %row = %$reserves->[$i]; - if ($reserves->[$i]{'constrainttype'} eq 'o'){ - $restitle=getreservetitle($reserves->[$i]{'biblionumber'},$reserves->[$i]{'borrowernumber'},$reserves->[$i]{'reservedate'},$reserves->[$i]{'timestamp'}); - %row = (%row , %$restitle); - } - push (@reservedata, \%row); +foreach my $reserveline (@$reserves) { + $reserveline->{'reservedate2'} = format_date($reserveline->{'reservedate'}); + my $restitle; + my %row = %$reserveline; + if ($reserveline->{'constrainttype'} eq 'o'){ + $restitle=getreservetitle($reserveline->{'biblionumber'},$reserveline->{'borrowernumber'},$reserveline->{'reservedate'},$reserveline->{'timestamp'}); + %row = (%row , %$restitle); + } + push (@reservedata, \%row); } $template->param($data); -- 2.39.5