Bugzilla – Attachment 76713 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]
[17.11.x] Bug 20927: moredetail.pl crash on nonexistent biblionumber
Bug-20927-moredetailpl-crash-on-nonexistent-biblio.patch (text/plain), 3.39 KB, created by
Marcel de Rooy
on 2018-07-06 05:55:28 UTC
(
hide
)
Description:
[17.11.x] Bug 20927: moredetail.pl crash on nonexistent biblionumber
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-07-06 05:55:28 UTC
Size:
3.39 KB
patch
obsolete
>From bbd068f7eb0d73be4ac066dd08f04355c3194a96 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 >Content-Type: text/plain; charset=utf-8 > >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> >Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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 3d6bd4a..a2fa89c 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 026e14f..0cd77a7 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"> >@@ -282,4 +297,5 @@ > browser.show(); > </script> > [% END %] >+[% END %] > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.1.4
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