[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 Serials.pm
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] koha/C4 Serials.pm |
Date: |
Wed, 27 Jun 2007 14:54:56 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Changes by: Henri-Damien LAURENT <hdl> 07/06/27 14:54:56
Modified files:
C4 : Serials.pm
Log message:
Bug Fixing.
IndependantBranches would lead to void information in GetSubscription
because select was for "''" and not ""
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Serials.pm?cvsroot=koha&r1=1.20&r2=1.21
Patches:
Index: Serials.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Serials.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- Serials.pm 25 May 2007 15:14:43 -0000 1.20
+++ Serials.pm 27 Jun 2007 14:54:55 -0000 1.21
@@ -17,7 +17,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: Serials.pm,v 1.20 2007/05/25 15:14:43 tipaul Exp $
+# $Id: Serials.pm,v 1.21 2007/06/27 14:54:55 hdl Exp $
use strict;
use C4::Date;
@@ -35,7 +35,7 @@
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.20 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.21 $' =~ /\d+/g;
shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v );
};
@@ -369,10 +369,11 @@
C4::Context->userenv &&
C4::Context->userenv->{'flags'} != 1){
# warn "flags: ".C4::Context->userenv->{'flags'};
- $query.=" AND subscription.branchcode IN
('".C4::Context->userenv->{'branch'}."',\"''\")";
+ $query.=" AND subscription.branchcode IN
('".C4::Context->userenv->{'branch'}."',\"\")";
}
# warn "query : $query";
my $sth = $dbh->prepare($query);
+# warn "subsid :$subscriptionid";
$sth->execute($subscriptionid);
my $subs = $sth->fetchrow_hashref;
return $subs;
@@ -1441,31 +1442,31 @@
= @_;
my $dbh = C4::Context->dbh;
my $subscription = GetSubscription($subscriptionid);
- my $query = qq|
- SELECT *
- FROM biblio,biblioitems
- WHERE biblio.biblionumber=biblioitems.biblionumber
- AND biblio.biblionumber=?
- |;
- my $sth = $dbh->prepare($query);
- $sth->execute( $subscription->{biblionumber} );
- my $biblio = $sth->fetchrow_hashref;
- NewSuggestion(
- $user, $subscription->{bibliotitle},
- $biblio->{author}, $biblio->{publishercode},
- $biblio->{note}, '',
- '', '',
- '', '',
- $subscription->{biblionumber}
- );
+# my $query = qq|
+# SELECT *
+# FROM biblio,biblioitems
+# WHERE biblio.biblionumber=biblioitems.biblionumber
+# AND biblio.biblionumber=?
+# |;
+# my $sth = $dbh->prepare($query);
+# $sth->execute( $subscription->{biblionumber} );
+# my $biblio = $sth->fetchrow_hashref;
+# NewSuggestion(
+# $user, $subscription->{bibliotitle},
+# $biblio->{author}, $biblio->{publishercode},
+# $biblio->{note}, '',
+# '', '',
+# '', '',
+# $subscription->{biblionumber}
+# );
# renew subscription
- $query = qq|
+ my $query = qq|
UPDATE subscription
SET startdate=?,numberlength=?,weeklength=?,monthlength=?
WHERE subscriptionid=?
|;
- $sth = $dbh->prepare($query);
+ my $sth = $dbh->prepare($query);
$sth->execute( format_date_in_iso($startdate),
$numberlength, $weeklength, $monthlength, $subscriptionid );
- [Koha-cvs] koha/C4 Serials.pm,
Henri-Damien LAURENT <=