[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 Biblio.pm
From: |
Joshua Ferraro |
Subject: |
[Koha-cvs] koha/C4 Biblio.pm |
Date: |
Mon, 03 Apr 2006 02:12:50 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch:
Changes by: Joshua Ferraro <address@hidden> 06/04/03 02:12:50
Modified files:
C4 : Biblio.pm
Log message:
some modifs to improve plugin support
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/Biblio.pm.diff?tr1=1.166&tr2=1.167&r1=text&r2=text
Patches:
Index: koha/C4/Biblio.pm
diff -u koha/C4/Biblio.pm:1.166 koha/C4/Biblio.pm:1.167
--- koha/C4/Biblio.pm:1.166 Sat Apr 1 22:10:50 2006
+++ koha/C4/Biblio.pm Mon Apr 3 02:12:49 2006
@@ -30,7 +30,7 @@
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.166 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.167 $' =~ /\d+/g;
shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
@ISA = qw(Exporter);
@@ -473,7 +473,8 @@
my $sth = $dbh->prepare("select marc from biblioitems where
biblionumber=?");
$sth->execute($biblionumber);
my ($rawmarc) = $sth->fetchrow;
- my $record = MARC::File::USMARC::decode($rawmarc);
+ my $record = C4::Search::get_record($biblionumber);
+ warn "ITEMRECORD".$record->as_formatted;
# now, find the relevant itemnumber
my ($itemnumberfield,$itemnumbersubfield) =
MARCfind_marc_from_kohafield($dbh,'items.itemnumber',$frameworkcode);
# prepare the new item record
@@ -481,11 +482,16 @@
# parse all fields fields from the complete record
foreach ($record->field($itemnumberfield)) {
# when the item field is found, save it
+ warn "Itenumberfield = $itemnumberfield";
if ($_->subfield($itemnumbersubfield) == $itemnumber) {
+ warn "Inside if subfield=$itemnumbersubfield";
$itemrecord->append_fields($_);
+ } else {
+ warn "No match subfield=$itemnumbersubfield and
+ itemnumber=$itemnumber";
}
}
-
+ warn "ITEMS".$itemrecord->as_formatted;
return $itemrecord;
}
@@ -1619,7 +1625,8 @@
}
my ($rawmarc,$frameworkcode) = $sth->fetchrow;
warn "ERROR IN REALmoditem, MARC record not found" unless $rawmarc;
- my $record = MARC::File::USMARC::decode($rawmarc);
+# my $record = MARC::File::USMARC::decode($rawmarc);
+ my $record=C4::Search::get_record($item->{biblionumber});
# ok, we have the marc record, find the previous item record for this
itemnumber and delete it
my ($itemnumberfield,$itemnumbersubfield) =
MARCfind_marc_from_kohafield($dbh,'items.itemnumber',$frameworkcode);
# prepare the new item record
@@ -3012,8 +3019,11 @@
=cut
-# $Id: Biblio.pm,v 1.166 2006/04/01 22:10:50 rangi Exp $
+# $Id: Biblio.pm,v 1.167 2006/04/03 02:12:49 kados Exp $
# $Log: Biblio.pm,v $
+# Revision 1.167 2006/04/03 02:12:49 kados
+# some modifs to improve plugin support
+#
# Revision 1.166 2006/04/01 22:10:50 rangi
# Fixing the problem that all items were getting biblioitem=1 set
#