[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 Biblio.pm [dev_week]
From: |
Joshua Ferraro |
Subject: |
[Koha-cvs] koha/C4 Biblio.pm [dev_week] |
Date: |
Sun, 24 Sep 2006 20:29:25 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Joshua Ferraro <kados> 06/09/24 20:29:25
Modified files:
C4 : Biblio.pm
Log message:
renaming OLDnewbiblio* to _koha_add_biblio*. These are strictly internal
functions
Adding POD documentation in some missing places
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Biblio.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.115.2.51.2.21&r2=1.115.2.51.2.22
Patches:
Index: Biblio.pm
===================================================================
RCS file: /sources/koha/koha/C4/Biblio.pm,v
retrieving revision 1.115.2.51.2.21
retrieving revision 1.115.2.51.2.22
diff -u -b -r1.115.2.51.2.21 -r1.115.2.51.2.22
--- Biblio.pm 24 Sep 2006 20:15:43 -0000 1.115.2.51.2.21
+++ Biblio.pm 24 Sep 2006 20:29:25 -0000 1.115.2.51.2.22
@@ -42,6 +42,7 @@
&newbiblio &newbiblioitem
&modnote &newsubject &newsubtitle
+
&checkitems
&newitems
@@ -113,33 +114,28 @@
my $olddata = MARCmarc2koha( $dbh, $record,$frameworkcode );
#
- $oldbibnum = OLDnewbiblio( $dbh, $olddata );
+ $oldbibnum = _koha_add_biblio( $dbh, $olddata );
$olddata->{'biblionumber'} = $oldbibnum;
- $oldbibitemnum = OLDnewbiblioitem( $dbh, $olddata );
+ $oldbibitemnum = _koha_add_biblioitem( $dbh, $olddata );
# search subtiles, addiauthors and subjects
- my ( $tagfield, $tagsubfield ) =
- MARCfind_marc_from_kohafield( $dbh,
"additionalauthors.author",$frameworkcode );
+ my ( $tagfield, $tagsubfield ) = MARCfind_marc_from_kohafield( $dbh,
"additionalauthors.author",$frameworkcode );
my @addiauthfields = $record->field($tagfield);
foreach my $addiauthfield (@addiauthfields) {
my @addiauthsubfields = $addiauthfield->subfield($tagsubfield);
foreach my $subfieldcount ( 0 .. $#addiauthsubfields ) {
- OLDmodaddauthor( $dbh, $oldbibnum,
- $addiauthsubfields[$subfieldcount] );
+ OLDmodaddauthor( $dbh, $oldbibnum,
$addiauthsubfields[$subfieldcount] );
}
}
- ( $tagfield, $tagsubfield ) =
- MARCfind_marc_from_kohafield( $dbh,
"bibliosubtitle.subtitle",$frameworkcode );
+ ( $tagfield, $tagsubfield ) = MARCfind_marc_from_kohafield( $dbh,
"bibliosubtitle.subtitle",$frameworkcode );
my @subtitlefields = $record->field($tagfield);
foreach my $subtitlefield (@subtitlefields) {
my @subtitlesubfields = $subtitlefield->subfield($tagsubfield);
foreach my $subfieldcount ( 0 .. $#subtitlesubfields ) {
- OLDnewsubtitle( $dbh, $oldbibnum,
- $subtitlesubfields[$subfieldcount] );
+ OLDnewsubtitle( $dbh, $oldbibnum,
$subtitlesubfields[$subfieldcount] );
}
}
- ( $tagfield, $tagsubfield ) =
- MARCfind_marc_from_kohafield( $dbh,
"bibliosubject.subject",$frameworkcode );
+ ( $tagfield, $tagsubfield ) = MARCfind_marc_from_kohafield( $dbh,
"bibliosubject.subject",$frameworkcode );
my @subj = $record->field($tagfield);
my @subjects;
foreach my $subject (@subj) {
@@ -1492,7 +1488,7 @@
#
#
-=item $biblionumber = OLDnewbiblio($dbh,$biblio);
+=item $biblionumber = _koha_add_biblio($dbh,$biblio);
adds a record in biblio table. Datas are in the hash $biblio.
@@ -1517,10 +1513,6 @@
modify a note for a biblioitem
-=item OLDnewbiblioitem($dbh,$biblioitem);
-
-adds a biblioitem ($biblioitem is a hash with the values)
-
=item OLDnewsubject($dbh,$bibnum);
adds a subject
@@ -1550,9 +1542,19 @@
delete a biblio
+=item _koha_add_biblio
+
+=over 4
+
+_koha_add_biblio($dbh,$biblioitem);
+
+Internal function to add a biblio ($biblio is a hash with the values)
+
+=back
+
=cut
-sub OLDnewbiblio {
+sub _koha_add_biblio {
my ( $dbh, $biblio ) = @_;
# my $dbh = &C4Connect;
@@ -1771,7 +1773,17 @@
# $dbh->disconnect;
}
-sub OLDnewbiblioitem {
+=item
+
+=over 4
+
+Internal function to add a biblioitem
+
+=back
+
+=cut
+
+sub _koha_add_biblioitem {
my ( $dbh, $biblioitem ) = @_;
# my $dbh = C4Connect;
@@ -2222,7 +2234,7 @@
sub newbiblio {
my ($biblio) = @_;
my $dbh = C4::Context->dbh;
- my $bibnum = OLDnewbiblio( $dbh, $biblio );
+ my $bibnum = _koha_add_biblio( $dbh, $biblio );
# finds new (MARC bibid
# my $bibid = &MARCfind_MARCbibid_from_oldbiblionumber($dbh,$bibnum);
my $record = &MARCkoha2marcBiblio( $dbh, $bibnum );
@@ -2300,7 +2312,7 @@
sub newbiblioitem {
my ($biblioitem) = @_;
my $dbh = C4::Context->dbh;
- my $bibitemnum = &OLDnewbiblioitem( $dbh, $biblioitem );
+ my $bibitemnum = &_koha_add_biblioitem( $dbh, $biblioitem );
my $MARCbiblio =
MARCkoha2marcBiblio( $dbh, 0, $bibitemnum )
@@ -2331,8 +2343,7 @@
foreach my $barcode (@barcodes) {
( $itemnumber, $error ) = &OLDnewitems( $dbh, $item, uc($barcode) );
$errors .= $error;
- my $MARCitem =
- &MARCkoha2marcItem( $dbh, $item->{biblionumber}, $itemnumber );
+ my $MARCitem = &MARCkoha2marcItem( $dbh, $item->{biblionumber},
$itemnumber );
&MARCadditem( $dbh, $MARCitem, $item->{biblionumber} );
}
return ($errors);
@@ -2980,8 +2991,14 @@
=cut
-# $Id: Biblio.pm,v 1.115.2.51.2.21 2006/09/24 20:15:43 kados Exp $
+# $Id: Biblio.pm,v 1.115.2.51.2.22 2006/09/24 20:29:25 kados Exp $
# $Log: Biblio.pm,v $
+# Revision 1.115.2.51.2.22 2006/09/24 20:29:25 kados
+# renaming OLDnewbiblio* to _koha_add_biblio*. These are strictly internal
+# functions
+#
+# Adding POD documentation in some missing places
+#
# Revision 1.115.2.51.2.21 2006/09/24 20:15:43 kados
# moving get_itypes to GetCcodes from Biblio.pm to Koha.pm
#
- [Koha-cvs] koha/C4 Biblio.pm [dev_week], Joshua Ferraro, 2006/09/22
- [Koha-cvs] koha/C4 Biblio.pm [dev_week], Joshua Ferraro, 2006/09/24
- [Koha-cvs] koha/C4 Biblio.pm [dev_week], Joshua Ferraro, 2006/09/24
- [Koha-cvs] koha/C4 Biblio.pm [dev_week],
Joshua Ferraro <=
- [Koha-cvs] koha/C4 Biblio.pm [dev_week], Joshua Ferraro, 2006/09/24
- [Koha-cvs] koha/C4 Biblio.pm [dev_week], Joshua Ferraro, 2006/09/24
- [Koha-cvs] koha/C4 Biblio.pm [dev_week], Joshua Ferraro, 2006/09/24
- [Koha-cvs] koha/C4 Biblio.pm [dev_week], Joshua Ferraro, 2006/09/24
- [Koha-cvs] koha/C4 Biblio.pm [dev_week], Joshua Ferraro, 2006/09/24
- [Koha-cvs] koha/C4 Biblio.pm [dev_week], Joshua Ferraro, 2006/09/24
- [Koha-cvs] koha/C4 Biblio.pm [dev_week], Joshua Ferraro, 2006/09/24