[Koha-patches] [PATCH] 6747 Additional check in opac-export
Marcel de Rooy
M.de.Rooy at rijksmuseum.nl
Thu Aug 18 12:50:31 CEST 2011
If GetMarcBiblio function returns undef, the opac-export script does not handle
it properly.
Also typo corrected.
---
opac/opac-export.pl | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/opac/opac-export.pl b/opac/opac-export.pl
index e8f7ede..849300c 100755
--- a/opac/opac-export.pl
+++ b/opac/opac-export.pl
@@ -40,8 +40,10 @@ if ($op eq "export") {
if ($biblionumber){
my $marc = GetMarcBiblio($biblionumber, 1);
-
- if ($format =~ /endnote/) {
+ if(!$marc) {
+ $error="Record could not be found!";
+ }
+ elsif ($format =~ /endnote/) {
$marc = marc2endnote($marc);
$format = 'endnote';
}
@@ -75,7 +77,7 @@ if ($op eq "export") {
if ($error){
print $query->header();
print $query->start_html();
- print "<h1>An error occured </h1>";
+ print "<h1>An error occurred </h1>";
print $error;
print $query->end_html();
}
--
1.6.0.6
More information about the Koha-patches
mailing list