[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 Biblio.pm Circulation.pm Context.pm Ove...
From: |
paul poulain |
Subject: |
[Koha-cvs] koha/C4 Biblio.pm Circulation.pm Context.pm Ove... |
Date: |
Tue, 17 Apr 2007 08:48:00 +0000 |
CVSROOT: /sources/koha
Module name: koha
Changes by: paul poulain <tipaul> 07/04/17 08:48:00
Modified files:
C4 : Biblio.pm Circulation.pm Context.pm Overdues.pm
Reserves2.pm
Log message:
circulation cleaning continued: bufixing
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Biblio.pm?cvsroot=koha&r1=1.195&r2=1.196
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation.pm?cvsroot=koha&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Context.pm?cvsroot=koha&r1=1.54&r2=1.55
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Overdues.pm?cvsroot=koha&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Reserves2.pm?cvsroot=koha&r1=1.52&r2=1.53
Patches:
Index: Biblio.pm
===================================================================
RCS file: /sources/koha/koha/C4/Biblio.pm,v
retrieving revision 1.195
retrieving revision 1.196
diff -u -b -r1.195 -r1.196
--- Biblio.pm 4 Apr 2007 16:46:22 -0000 1.195
+++ Biblio.pm 17 Apr 2007 08:48:00 -0000 1.196
@@ -33,7 +33,7 @@
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.195 $' =~ /\d+/g; shift(@v).".".join(
"_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.196 $' =~ /\d+/g; shift(@v).".".join(
"_", map { sprintf "%03d", $_ } @v ); };
@ISA = qw( Exporter );
@@ -66,7 +66,7 @@
&GetMarcSeries
&GetItemsInfo
- &GetItemFromBarcode
+ &GetItemnumberFromBarcode
&get_itemnumbers_of
&GetXmlBiblio
@@ -1133,17 +1133,17 @@
return ($data);
} # sub &GetBiblioItemData
-=head2 GetItemFromBarcode
+=head2 GetItemnumberFromBarcode
=over 4
-$result = GetItemFromBarcode($barcode);
+$result = GetItemnumberFromBarcode($barcode);
=back
=cut
-sub GetItemFromBarcode {
+sub GetItemnumberFromBarcode {
my ($barcode) = @_;
my $dbh = C4::Context->dbh;
@@ -1497,13 +1497,12 @@
$dbh->prepare("select marcxml from biblioitems where biblionumber=? ");
$sth->execute($biblionumber);
my ($marcxml) = $sth->fetchrow;
-# warn "marcxml : $marcxml";
MARC::File::XML->default_record_format(C4::Context->preference('marcflavour'));
- $marcxml =~ s/\x1e//g;
- $marcxml =~ s/\x1f//g;
- $marcxml =~ s/\x1d//g;
- $marcxml =~ s/\x0f//g;
- $marcxml =~ s/\x0c//g;
+# $marcxml =~ s/\x1e//g;
+# $marcxml =~ s/\x1f//g;
+# $marcxml =~ s/\x1d//g;
+# $marcxml =~ s/\x0f//g;
+# $marcxml =~ s/\x0c//g;
my $record = MARC::Record->new();
$record = MARC::Record::new_from_xml( $marcxml,
"utf8",C4::Context->preference('marcflavour')) if $marcxml;
return $record;
@@ -1593,9 +1592,7 @@
my $marcxml = GetXmlBiblio($biblionumber);
my $record = MARC::Record->new();
-# warn "marcxml :$marcxml";
$record = MARC::Record::new_from_xml( $marcxml, "utf8", $marcflavour );
-# warn "record :".$record->as_formatted;
# now, find where the itemnumber is stored & extract only the item
my ( $itemnumberfield, $itemnumbersubfield ) =
GetMarcFromKohaField( $dbh, 'items.itemnumber', '' );
@@ -2101,7 +2098,6 @@
# the last has not been included inside the loop... do it now !
$record->insert_fields_ordered($field) if $field;
- # warn "HTML2MARC=".$record->as_formatted;
$record->encoding('UTF-8');
# $record->MARC::File::USMARC::update_leader();
@@ -3652,8 +3648,11 @@
=cut
-# $Id: Biblio.pm,v 1.195 2007/04/04 16:46:22 tipaul Exp $
+# $Id: Biblio.pm,v 1.196 2007/04/17 08:48:00 tipaul Exp $
# $Log: Biblio.pm,v $
+# Revision 1.196 2007/04/17 08:48:00 tipaul
+# circulation cleaning continued: bufixing
+#
# Revision 1.195 2007/04/04 16:46:22 tipaul
# HUGE COMMIT : code cleaning circulation.
#
Index: Circulation.pm
===================================================================
RCS file: /sources/koha/koha/C4/Circulation.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- Circulation.pm 5 Apr 2007 08:53:31 -0000 1.11
+++ Circulation.pm 17 Apr 2007 08:48:00 -0000 1.12
@@ -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: Circulation.pm,v 1.11 2007/04/05 08:53:31 hdl Exp $
+# $Id: Circulation.pm,v 1.12 2007/04/17 08:48:00 tipaul Exp $
use strict;
require Exporter;
@@ -44,7 +44,7 @@
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.11 $' =~ /\d+/g; shift(@v).".".join(
"_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.12 $' =~ /\d+/g; shift(@v).".".join(
"_", map { sprintf "%03d", $_ } @v ); };
=head1 NAME
@@ -221,7 +221,7 @@
my %env;
my $dotransfer = 1;
my $branches = GetBranches();
- my $item = GetItemFromBarcode( $barcode );
+ my $item = GetItemnumberFromBarcode( $barcode );
my $issue = GetItemIssues($item->{itemnumber});
# bad barcode..
@@ -697,7 +697,7 @@
my ( $env, $borrower, $barcode, $year, $month, $day, $inprocess ) = @_;
my %needsconfirmation; # filled with problems that needs confirmations
my %issuingimpossible; # filled with problems that causes the issue to
be IMPOSSIBLE
- my $item = GetItem(GetItemFromBarcode( $barcode ));
+ my $item = GetItem(GetItemnumberFromBarcode( $barcode ));
my $issue = GetItemIssue($item->{itemnumber});
my $dbh = C4::Context->dbh;
@@ -877,7 +877,7 @@
=item C<$date> contains the max date of return. calculated if empty.
AddIssue does the following things :
-- step 0°: check that there is a borrowernumber & a barcode provided
+- step 0�: check that there is a borrowernumber & a barcode provided
- check for RENEWAL (book issued & being issued to the same patron)
- renewal YES = Calculate Charge & renew
- renewal NO =
@@ -1219,7 +1219,7 @@
die '$branch not defined' unless defined $branch; # just in case (bug 170)
# get information on item
- my $iteminformation = GetItemIssue( GetItemFromBarcode($barcode));
+ my $iteminformation = GetItemIssue( GetItemnumberFromBarcode($barcode));
if ( not $iteminformation ) {
$messages->{'BadBarcode'} = $barcode;
$doreturn = 0;
@@ -1240,7 +1240,7 @@
# check that the book has been cancelled
if ( $iteminformation->{'wthdrawn'} ) {
- $messages->{'wthdrawn'} = 1;itemnumber
+ $messages->{'wthdrawn'} = 1;
$doreturn = 0;
}
@@ -1311,8 +1311,6 @@
my ( $resfound, $resrec ) =
CheckReserves( $iteminformation->{'itemnumber'} );
if ($resfound) {
-
-# my $tobrcd = ReserveWaiting($resrec->{'itemnumber'},
$resrec->{'borrowernumber'});
$resrec->{'ResFound'} = $resfound;
$messages->{'ResFound'} = $resrec;
$reserveDone = 1;
@@ -1409,7 +1407,7 @@
if ( $datedue < $today ) {
$data->{'overdue'} = 1;
}
- my $itemnumber = $data->{'itemnumber'};
+ $data->{'itemnumber'} = $itemnumber; # fill itemnumber, in case item is
not on issue
$sth->finish;
return ($data);
}
Index: Context.pm
===================================================================
RCS file: /sources/koha/koha/C4/Context.pm,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- Context.pm 29 Mar 2007 16:45:53 -0000 1.54
+++ Context.pm 17 Apr 2007 08:48:00 -0000 1.55
@@ -16,7 +16,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: Context.pm,v 1.54 2007/03/29 16:45:53 tipaul Exp $
+# $Id: Context.pm,v 1.55 2007/04/17 08:48:00 tipaul Exp $
use strict;
use DBI;
use ZOOM;
@@ -28,7 +28,7 @@
qw($context),
qw(@context_stack);
-$VERSION = do { my @v = '$Revision: 1.54 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.55 $' =~ /\d+/g;
shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
=head1 NAME
@@ -545,6 +545,7 @@
# Koha 3.0 is utf-8, so force utf8 communication between mySQL and koha,
whatever the mysql default config.
# this is better than modifying my.cnf (and forcing all communications to
be in utf8)
$dbh->do("set NAMES 'utf8'") if ($dbh);
+ $dbh->{'mysql_enable_utf8'}=1; #enable
return $dbh;
}
@@ -874,6 +875,9 @@
=cut
# $Log: Context.pm,v $
+# Revision 1.55 2007/04/17 08:48:00 tipaul
+# circulation cleaning continued: bufixing
+#
# Revision 1.54 2007/03/29 16:45:53 tipaul
# Code cleaning of Biblio.pm (continued)
#
Index: Overdues.pm
===================================================================
RCS file: /sources/koha/koha/C4/Overdues.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Overdues.pm 5 Apr 2007 08:53:31 -0000 1.1
+++ Overdues.pm 17 Apr 2007 08:48:00 -0000 1.2
@@ -1,6 +1,6 @@
package C4::Overdues;
-# $Id: Overdues.pm,v 1.1 2007/04/05 08:53:31 hdl Exp $
+# $Id: Overdues.pm,v 1.2 2007/04/17 08:48:00 tipaul Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -29,7 +29,7 @@
use C4::Log; # logaction
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.1 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.2 $' =~ /\d+/g;
shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
=head1 NAME
Index: Reserves2.pm
===================================================================
RCS file: /sources/koha/koha/C4/Reserves2.pm,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- Reserves2.pm 4 Apr 2007 16:46:22 -0000 1.52
+++ Reserves2.pm 17 Apr 2007 08:48:00 -0000 1.53
@@ -20,7 +20,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: Reserves2.pm,v 1.52 2007/04/04 16:46:22 tipaul Exp $
+# $Id: Reserves2.pm,v 1.53 2007/04/17 08:48:00 tipaul Exp $
use strict;
require Exporter;
@@ -33,7 +33,7 @@
my $library_name = C4::Context->preference("LibraryName");
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.52 $' =~ /\d+/g; shift(@v) . "." . join(
"_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.53 $' =~ /\d+/g; shift(@v) . "." . join(
"_", map { sprintf "%03d", $_ } @v ); };
=head1 NAME
@@ -129,7 +129,7 @@
);
#launch the subroutine dotransfer
- C4::Circulation::Circ2::dotransfer(
+ C4::Circulation::dotransfer(
$itemnumber,
$iteminfo->{'holdingbranch'},
$checkreserves->{'branchcode'}
@@ -1387,22 +1387,23 @@
=head2 GetReservesToBranch
address@hidden = GetReservesToBranch( $frombranch, $excludingbranch );
address@hidden = GetReservesToBranch( $frombranch );
+
+Get reserve list for a given branch
=cut
sub GetReservesToBranch {
- my ( $frombranch, $excludingbranch ) = @_;
+ my ( $frombranch ) = @_;
my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare(
"SELECT borrowernumber,reservedate,itemnumber,timestamp
FROM reserves
WHERE priority='0' AND cancellationdate is null
AND branchcode=?
- AND branchcode!=?
AND found IS NULL "
);
- $sth->execute( $frombranch, $excludingbranch );
+ $sth->execute( $frombranch );
my @transreserv;
my $i = 0;
while ( my $data = $sth->fetchrow_hashref ) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/C4 Biblio.pm Circulation.pm Context.pm Ove...,
paul poulain <=