From a400e4be5980801ddd75723963fc8e5474d92113 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Sun, 30 Sep 2007 22:22:31 +0200 Subject: [PATCH] Bug Fixing : Signed-off-by: Chris Cormack --- C4/Members.pm | 4 ++-- C4/Serials.pm | 15 ++++++++------- koha-tmpl/opac-tmpl/prog/en/opac-advsearch.tmpl | 12 ++++++------ 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index e0355fc6df..5616c21020 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -589,7 +589,7 @@ sub ModMember { if ( $data{'password'} eq '****' ) { delete $data{'password'}; foreach (keys %data) - {push @parameters,"$_ = ".$dbh->quote($data{$_}) if ($_ ne "borrowernumber" and $hashborrowerfields{$_} and $data{$_})} ; + {push @parameters,"$_ = ".$dbh->quote($data{$_}) if ($_ ne "borrowernumber" and $hashborrowerfields{$_}) } ; $query = "UPDATE borrowers SET ".join (",",@parameters) ." WHERE borrowernumber=$data{'borrowernumber'}"; # warn "$query"; @@ -600,7 +600,7 @@ sub ModMember { $data{'password'} = md5_base64( $data{'password'} ) if ( $data{'password'} ne '' ); delete $data{'password'} if ($data{password} eq ""); foreach (keys %data) - {push @parameters,"$_ = ".$dbh->quote($data{$_}) if ($_ ne "borrowernumber" and $hashborrowerfields{$_} and $data{$_})} ; + {push @parameters,"$_ = ".$dbh->quote($data{$_}) if ($_ ne "borrowernumber" and $hashborrowerfields{$_})} ; $query = "UPDATE borrowers SET ".join (",",@parameters)." WHERE borrowernumber=$data{'borrowernumber'}"; # warn "$query"; diff --git a/C4/Serials.pm b/C4/Serials.pm index 93afe6b931..fe0b15fb78 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -366,12 +366,12 @@ sub GetSubscription { LEFT JOIN biblio ON biblio.biblionumber=subscription.biblionumber WHERE subscription.subscriptionid = ? ); - if (C4::Context->preference('IndependantBranches') && - C4::Context->userenv && - C4::Context->userenv->{'flags'} != 1){ -# warn "flags: ".C4::Context->userenv->{'flags'}; - $query.=" AND subscription.branchcode IN ('".C4::Context->userenv->{'branch'}."',\"\")"; - } +# if (C4::Context->preference('IndependantBranches') && +# C4::Context->userenv && +# C4::Context->userenv->{'flags'} != 1){ +# # warn "flags: ".C4::Context->userenv->{'flags'}; +# $query.=" AND subscription.branchcode IN ('".C4::Context->userenv->{'branch'}."',\"\")"; +# } # warn "query : $query"; my $sth = $dbh->prepare($query); # warn "subsid :$subscriptionid"; @@ -2307,8 +2307,9 @@ sub abouttoexpire { "select max(planneddate) from serial where subscriptionid=?"); $sth->execute($subscriptionid); my ($res) = $sth->fetchrow ; -# warn "date expiration : ".$expirationdate." date courante ".$res; +# warn "date expiration : ".$expirationdate." date courante ".$res; my @res=split /-/,$res; + @res=Date::Calc::Today if ($res[0]*$res[1]==0); my @endofsubscriptiondate=split/-/,$expirationdate; my $per = $subscription->{'periodicity'}; my $x; diff --git a/koha-tmpl/opac-tmpl/prog/en/opac-advsearch.tmpl b/koha-tmpl/opac-tmpl/prog/en/opac-advsearch.tmpl index 6a0ed42f60..22eb27266f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/opac-advsearch.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/opac-advsearch.tmpl @@ -59,7 +59,7 @@ -- 2.39.5