Bugzilla – Attachment 64825 Details for
Bug 18260
Koha::Biblio - Remove GetBiblio
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18260: Handle nonexistent biblionumber in imageviewer.pl
Bug-18260-Handle-nonexistent-biblionumber-in-image.patch (text/plain), 1.38 KB, created by
Jonathan Druart
on 2017-07-05 19:27:24 UTC
(
hide
)
Description:
Bug 18260: Handle nonexistent biblionumber in imageviewer.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-07-05 19:27:24 UTC
Size:
1.38 KB
patch
obsolete
>From 48d7ab54988be3afb36ee7808fa71cd7d29b9b69 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 5 Jul 2017 16:26:37 -0300 >Subject: [PATCH] Bug 18260: Handle nonexistent biblionumber in imageviewer.pl > >--- > catalogue/imageviewer.pl | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > >diff --git a/catalogue/imageviewer.pl b/catalogue/imageviewer.pl >index aa73e9dd1a..cca7304fb9 100755 >--- a/catalogue/imageviewer.pl >+++ b/catalogue/imageviewer.pl >@@ -45,8 +45,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > my $biblionumber = $query->param('biblionumber') || $query->param('bib'); > my $imagenumber = $query->param('imagenumber'); > my $biblio = Koha::Biblios->find( $biblionumber ); >-my $itemcount = $biblio->items->count;; >- >+my $itemcount = $biblio ? $biblio->items->count : 0; > my @items = GetItemsInfo($biblionumber); > > my $norequests = 1; >@@ -110,7 +109,7 @@ my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ; > $template->param (countdeletedorders => $count_deletedorders_using_biblio); > > $biblio = Koha::Biblios->find( $biblionumber ); >-my $holds = $biblio->holds; >-$template->param( holdcount => $holds->count ); >+my $hold_count = $biblio ? $biblio->holds->count : 0; >+$template->param( holdcount => $hold_count ); > > output_html_with_http_headers $query, $cookie, $template->output; >-- >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 18260
:
61053
|
63743
|
63760
|
64823
|
64825
|
64897
|
64898
|
64899