[Koha-patches] [PATCH] Bug 6480 - Koha produces a lot of apache logs for UNIMARC
Janusz Kaczmarek
januszop at gmail.com
Tue Jun 7 21:32:17 CEST 2011
For Koha with UNIMARC a lot of entries in apache log lines are produced.
In the patch, corrections to the GetCOinSBiblio function has been introduces,
in the UNIMARC section: (i.e. || '' at the end of lines that can create this
problem) -- analogous as it is in the MARC21 section.
---
C4/Biblio.pm | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index 3c8936b..3d1cf3e 100755
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -1175,8 +1175,8 @@ sub GetCOinSBiblio {
if ( C4::Context->preference("marcflavour") eq "UNIMARC" ) {
# Setting datas
- $aulast = $record->subfield( '700', 'a' );
- $aufirst = $record->subfield( '700', 'b' );
+ $aulast = $record->subfield( '700', 'a' ) || '';
+ $aufirst = $record->subfield( '700', 'b' ) || '';
$oauthors = "&rft.au=$aufirst $aulast";
# others authors
@@ -1189,10 +1189,10 @@ sub GetCOinSBiblio {
( $mtx eq 'dc' )
? "&rft.title=" . $record->subfield( '200', 'a' )
: "&rft.title=" . $record->subfield( '200', 'a' ) . "&rft.btitle=" . $record->subfield( '200', 'a' );
- $pubyear = $record->subfield( '210', 'd' );
- $publisher = $record->subfield( '210', 'c' );
- $isbn = $record->subfield( '010', 'a' );
- $issn = $record->subfield( '011', 'a' );
+ $pubyear = $record->subfield( '210', 'd' ) || '';
+ $publisher = $record->subfield( '210', 'c' ) || '';
+ $isbn = $record->subfield( '010', 'a' ) || '';
+ $issn = $record->subfield( '011', 'a' ) || '';
} else {
# MARC21 need some improve
--
1.7.2.5
More information about the Koha-patches
mailing list