[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Biblio.pm,1.115.2.15,1.115.2.16
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/C4 Biblio.pm,1.115.2.15,1.115.2.16 |
Date: |
Thu, 28 Jul 2005 12:56:19 -0700 |
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16677/C4
Modified Files:
Tag: rel_2_2
Biblio.pm
Log Message:
* removing a useless & CPU consuming call to MARCgetbiblio
* Leader management.
If you create a MARC tag "000", with a subfield '@', it will be managed as the
leader.
Seems to work correctly.
Now going to create a plugin for leader()
Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.115.2.15
retrieving revision 1.115.2.16
diff -C2 -r1.115.2.15 -r1.115.2.16
*** Biblio.pm 19 Jul 2005 15:25:40 -0000 1.115.2.15
--- Biblio.pm 28 Jul 2005 19:56:15 -0000 1.115.2.16
***************
*** 369,372 ****
--- 369,374 ----
}
}
+ # save leader
+
&MARCaddsubfield($dbh,$bibid,'000','',$fieldcount+1,'',1,$record->leader);
$dbh->do("unlock tables");
return $bibid;
***************
*** 479,484 ****
my $record = MARC::Record->new();
- #---- TODO : the leader is missing
- $record->leader(' ');
my $sth =
$dbh->prepare(
--- 481,484 ----
***************
*** 508,513 ****
$previndicator .= " ";
if ( $prevtag < 10 ) {
! $record->add_fields( ( sprintf "%03s", $prevtag ), $prevvalue
)
! unless $prevtag eq "XXX"; # ignore the 1st loop
}
else {
--- 508,516 ----
$previndicator .= " ";
if ( $prevtag < 10 ) {
! if ($prevtag ne '000') {
! $record->add_fields( ( sprintf "%03s", $prevtag ),
$prevvalue ) unless $prevtag eq "XXX"; # ignore the 1st loop
! } else {
!
$record->leader(sprintf("%24s",$prevvalue));
! }
}
else {
***************
*** 628,635 ****
sub MARCmodbiblio {
my ($dbh,$bibid,$record,$frameworkcode,$delete)address@hidden;
- my $oldrecord=&MARCgetbiblio($dbh,$bibid);
- if ($oldrecord eq $record) {
- return;
- }
# 1st delete the biblio,
# 2nd recreate it
--- 631,634 ----
***************
*** 1034,1038 ****
if ($prevtag < 10) {
if ($prevvalue) {
! $record->add_fields((sprintf
"%03s",$prevtag),$prevvalue);
}
} else {
--- 1033,1041 ----
if ($prevtag < 10) {
if ($prevvalue) {
! if ($prevtag ne '000') {
! $record->add_fields((sprintf
"%03s",$prevtag),$prevvalue);
! } else {
! $record->leader($prevvalue);
! }
}
} else {
***************
*** 2430,2434 ****
# $encoding = C4::Context->preference("marcflavour") unless
$encoding;
if ( $encoding eq "UNIMARC" ) {
! s/\xe1/Æ/gm;
s/\xe2/Ð/gm;
s/\xe9/Ø/gm;
--- 2433,2437 ----
# $encoding = C4::Context->preference("marcflavour") unless
$encoding;
if ( $encoding eq "UNIMARC" ) {
! # s/\xe1/Æ/gm;
s/\xe2/Ð/gm;
s/\xe9/Ø/gm;
***************
*** 2722,2725 ****
--- 2725,2736 ----
# $Id$
# $Log$
+ # Revision 1.115.2.16 2005/07/28 19:56:15 tipaul
+ # * removing a useless & CPU consuming call to MARCgetbiblio
+ # * Leader management.
+ # If you create a MARC tag "000", with a subfield '@', it will be managed as
the leader.
+ # Seems to work correctly.
+ #
+ # Now going to create a plugin for leader()
+ #
# Revision 1.115.2.15 2005/07/19 15:25:40 tipaul
# * fixing a bug in subfield order when MARCgetbiblio
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Biblio.pm,1.115.2.15,1.115.2.16,
Paul POULAIN <=
- Prev by Date:
[Koha-cvs] CVS: koha/acqui.simple addbiblio.pl,1.52.2.8,1.52.2.9 additem.pl,1.27.2.3,1.27.2.4
- Next by Date:
[Koha-cvs] CVS: koha/search.marc search.pl,1.24,1.25
- Previous by thread:
[Koha-cvs] CVS: koha/acqui.simple addbiblio.pl,1.52.2.8,1.52.2.9 additem.pl,1.27.2.3,1.27.2.4
- Next by thread:
[Koha-cvs] CVS: koha/search.marc search.pl,1.24,1.25
- Index(es):