Bugzilla – Attachment 64898 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.47 KB, created by
Marcel de Rooy
on 2017-07-07 09:07:38 UTC
(
hide
)
Description:
Bug 18260: Handle nonexistent biblionumber in imageviewer.pl
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-07-07 09:07:38 UTC
Size:
1.47 KB
patch
obsolete
>From 5c7519afb73054ebbca26a7708e5d26d2cb17245 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 >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > catalogue/imageviewer.pl | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > >diff --git a/catalogue/imageviewer.pl b/catalogue/imageviewer.pl >index aa73e9d..cca7304 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.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 18260
:
61053
|
63743
|
63760
|
64823
|
64825
|
64897
| 64898 |
64899