[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 Biblio.pm [rel_3_0]
From: |
Antoine Farnault |
Subject: |
[Koha-cvs] koha/C4 Biblio.pm [rel_3_0] |
Date: |
Tue, 31 Oct 2006 17:20:49 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_3_0
Changes by: Antoine Farnault <toins> 06/10/31 17:20:49
Modified files:
C4 : Biblio.pm
Log message:
* moving bibitemdata from search to here.
* using _koha_modify_biblio instead of OLDmodbiblio.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Biblio.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.178.2.19&r2=1.178.2.20
Patches:
Index: Biblio.pm
===================================================================
RCS file: /sources/koha/koha/C4/Biblio.pm,v
retrieving revision 1.178.2.19
retrieving revision 1.178.2.20
diff -u -b -r1.178.2.19 -r1.178.2.20
--- Biblio.pm 20 Oct 2006 15:26:41 -0000 1.178.2.19
+++ Biblio.pm 31 Oct 2006 17:20:49 -0000 1.178.2.20
@@ -88,6 +88,7 @@
&itemcalculator &calculatelc
&GetItemInfosOf &GetItemStatus &GetItemLocation
&GetBiblioItemInfosOf
+ &bibitemdata
);
=head1 NAME
@@ -1757,6 +1758,34 @@
}
}
+
+=item bibitemdata
+
+ $itemdata = &bibitemdata($biblioitemnumber);
+
+Looks up the biblioitem with the given biblioitemnumber. Returns a
+reference-to-hash. The keys are the fields from the C<biblio>,
+C<biblioitems>, and C<itemtypes> tables in the Koha database, except
+that C<biblioitems.notes> is given as C<$itemdata-E<gt>{bnotes}>.
+
+=cut
+
+#'
+sub bibitemdata {
+ my ($bibitem) = @_;
+ my $dbh = C4::Context->dbh;
+ my $sth = $dbh->prepare("Select *,biblioitems.notes as bnotes from
biblioitems, biblio,itemtypes where biblio.biblionumber =
biblioitems.biblionumber and biblioitemnumber = ? and biblioitems.itemtype =
itemtypes.itemtype");
+ my $data;
+
+ $sth->execute($bibitem);
+
+ $data = $sth->fetchrow_hashref;
+
+ $sth->finish;
+ return($data);
+} # sub bibitemdata
+
+
=head2 ModBiblioframework
=over 4
@@ -1784,7 +1813,7 @@
my $oldbiblio = MARCmarc2koha($dbh,$record,$frameworkcode);
- my $oldbiblionumber = OLDmodbiblio($dbh,$oldbiblio);
+ my $oldbiblionumber = _koha_modify_biblio($dbh,$oldbiblio);
OLDmodbibitem($dbh,$oldbiblio);
@@ -2654,7 +2683,7 @@
sub modbiblio {
my ($biblio) = @_;
my $dbh = C4::Context->dbh;
- my $biblionumber=OLDmodbiblio($dbh,$biblio);
+ my $biblionumber=_koha_modify_biblio($dbh,$biblio);
my $record = MARCkoha2marcBiblio($dbh,$biblionumber,$biblionumber);
# finds new (MARC bibid
my $bibid =
&MARCfind_MARCbibid_from_oldbiblionumber($dbh,$biblionumber);
@@ -2726,7 +2755,7 @@
sub modbibitem {
my ($biblioitem) = @_;
my $dbh = C4::Context->dbh;
- &OLDmodbibitem( $dbh, $biblioitem );
+ &_koha_modify_biblio( $dbh, $biblioitem );
} # sub modbibitem
sub modnote {
@@ -3829,8 +3858,12 @@
=cut
-# $Id: Biblio.pm,v 1.178.2.19 2006/10/20 15:26:41 toins Exp $
+# $Id: Biblio.pm,v 1.178.2.20 2006/10/31 17:20:49 toins Exp $
# $Log: Biblio.pm,v $
+# Revision 1.178.2.20 2006/10/31 17:20:49 toins
+# * moving bibitemdata from search to here.
+# * using _koha_modify_biblio instead of OLDmodbiblio.
+#
# Revision 1.178.2.19 2006/10/20 15:26:41 toins
# sync with dev_week.
#
- [Koha-cvs] koha/C4 Biblio.pm [rel_3_0], Henri-Damien LAURENT, 2006/10/02
- [Koha-cvs] koha/C4 Biblio.pm [rel_3_0], paul poulain, 2006/10/11
- [Koha-cvs] koha/C4 Biblio.pm [rel_3_0], paul poulain, 2006/10/11
- [Koha-cvs] koha/C4 Biblio.pm [rel_3_0], Antoine Farnault, 2006/10/16
- [Koha-cvs] koha/C4 Biblio.pm [rel_3_0], Bruno Toumi, 2006/10/19
- [Koha-cvs] koha/C4 Biblio.pm [rel_3_0], Antoine Farnault, 2006/10/20
- [Koha-cvs] koha/C4 Biblio.pm [rel_3_0],
Antoine Farnault <=