Bugzilla – Attachment 76016 Details for
Bug 20927
moredetail.pl crash on nonexistent biblionumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20927: moredetail.pl crash on nonexistent biblionumber
0001-Bug-20927-moredetail.pl-crash-on-nonexistent-biblion.patch (text/plain), 3.25 KB, created by
paxed
on 2018-06-13 04:50:30 UTC
(
hide
)
Description:
Bug 20927: moredetail.pl crash on nonexistent biblionumber
Filename:
MIME Type:
Creator:
paxed
Created:
2018-06-13 04:50:30 UTC
Size:
3.25 KB
patch
obsolete
>From 420f6e07e2df392019d68f487402bc33b7620987 Mon Sep 17 00:00:00 2001 >From: Pasi Kallinen <pasi.kallinen@joensuu.fi> >Date: Wed, 13 Jun 2018 07:40:19 +0300 >Subject: [PATCH] Bug 20927: moredetail.pl crash on nonexistent biblionumber > >moredetail.pl crashes when trying to view a nonexistent biblionumber. > >The case should be handled like it is done in detail.pl. > >Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> >--- > catalogue/moredetail.pl | 8 ++++++++ > .../prog/en/modules/catalogue/moredetail.tt | 20 ++++++++++++++++++-- > 2 files changed, 26 insertions(+), 2 deletions(-) > >diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl >index 3d6bd4ab6c..a2fa89ca0f 100755 >--- a/catalogue/moredetail.pl >+++ b/catalogue/moredetail.pl >@@ -99,6 +99,14 @@ for my $itm (@all_items) { > > my $record=GetMarcBiblio({ biblionumber => $biblionumber }); > >+if ( not defined $record ) { >+ # biblionumber invalid -> report and exit >+ $template->param( unknownbiblionumber => 1, >+ biblionumber => $biblionumber ); >+ output_html_with_http_headers $query, $cookie, $template->output; >+ exit; >+} >+ > my $hostrecords; > # adding items linked via host biblios > my @hostitems = GetHostItemsInfo($record); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >index b1a261fa26..f27e63c8ec 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -3,7 +3,13 @@ > [% USE Branches %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >-<title>Koha › Catalog › Item details for [% title | html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %]</title> >+<title>Koha › Catalog › >+ [% IF ( unknownbiblionumber ) %] >+ Unknown record >+ [% ELSE %] >+ Item details for [% title | html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %] >+ [% END %] >+</title> > [% INCLUDE 'doc-head-close.inc' %] > <style type="text/css">h3{padding-top: 1em; border-top: 2px solid #CCCCCC;}#exportLabelexportModal_{border-top: 0px;}</style> > </head> >@@ -12,10 +18,19 @@ > [% INCLUDE 'header.inc' %] > [% INCLUDE 'cat-search.inc' %] > >-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> › Item details for <i>[% title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield|html %][% END %]</i></div> >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> › >+ [% IF ( unknownbiblionumber ) %] >+ Unknown record >+ [% ELSE %] >+ Item details for <i>[% title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield|html %][% END %]</i> >+ [% END %] >+</div> > > <div id="doc3" class="yui-t2"> > >+[% IF ( unknownbiblionumber ) %] >+ <div class="dialog message">The record you requested does not exist ([% biblionumber %]).</div> >+[% ELSE %] > <div id="bd"> > <div id="yui-main"> > <div class="yui-b"> >@@ -286,4 +301,5 @@ > browser.show(); > </script> > [% END %] >+[% END %] > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.11.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20927
:
76016
|
76305
|
76713
|
76865