From d92dc91f778f5db3360f3070d0bb5d44a0d75024 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 2 Dec 2013 09:41:53 +0100 Subject: [PATCH] Bug 11329: Check for MARC record existence in catalogue/showmarc Intranet counterpart patch. Same check as in opac/opac-showmarc. Test plan: [1] Run showmarc.pl with valid biblionumber in id parameter. [2] Remove id parameter from URL. You should get a 404 now. Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall Passes koha-qa.pl, works as advertised. Signed-off-by: Galen Charlton --- catalogue/showmarc.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/catalogue/showmarc.pl b/catalogue/showmarc.pl index 0ee70c5fea..9cc039d826 100755 --- a/catalogue/showmarc.pl +++ b/catalogue/showmarc.pl @@ -50,6 +50,10 @@ if ($importid) { else { $record =GetMarcBiblio($biblionumber); } +if(!ref $record) { + print $input->redirect("/cgi-bin/koha/errors/404.pl"); + exit; +} if($view eq 'card') { my $themelang = '/' . C4::Templates::_current_language(); -- 2.20.1