From d8277dcb78b81f753adbb84531d22e65f776dbae Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 18 Aug 2011 12:32:34 +0200 Subject: [PATCH] 6747 Additional check in opac-export Content-Type: text/plain; charset="utf-8" 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 "

An error occured

"; + print "

An error occurred

"; print $error; print $query->end_html(); } -- 1.6.0.6