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 <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d92dc91f77)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ce7cd56c0b)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Marcel de Rooy 2013-12-02 09:41:53 +01:00 committed by Chris Cormack
parent 3e9986ec18
commit 9fb1be2b24
1 changed files with 4 additions and 0 deletions

View File

@ -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();