Bugzilla – Attachment 185440 Details for
Bug 40585
Prevent crash on biblionumber in addbybiblionumber.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40585: (follow-up) Display error if no records were found
Bug-40585-follow-up-Display-error-if-no-records-we.patch (text/plain), 2.18 KB, created by
Owen Leonard
on 2025-08-15 11:19:21 UTC
(
hide
)
Description:
Bug 40585: (follow-up) Display error if no records were found
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-08-15 11:19:21 UTC
Size:
2.18 KB
patch
obsolete
>From d04680b914a4482c75b8ba15287bd176cf7e78eb Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 15 Aug 2025 11:16:49 +0000 >Subject: [PATCH] Bug 40585: (follow-up) Display error if no records were found > >--- > .../en/modules/virtualshelves/addbybiblionumber.tt | 3 ++- > virtualshelves/addbybiblionumber.pl | 13 ++++++++----- > 2 files changed, 10 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tt >index 8dcaf8b7e56..95c47783641 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tt >@@ -13,10 +13,11 @@ > <body id="lists_addbybiblionumber" class="lists"> > <div class="container-fluid"> > [% UNLESS (authorized) %] >+ <h1>Error adding to list</h1> > <div class="alert alert-warning"> >- <h1>Error adding to list</h1> > [% IF (errcode==1) %]<p>Could not create a new list. Please check the name.</p>[% END %] > [% IF (errcode==2) %]<p>Sorry, you do not have permission to add items to this list.</p>[% END %] >+ [% IF (errcode==3) %]<p>The titles selected were not found</p>[% END %] > <button class="btn btn-default close_window focus">Close window</button> > </div> > [% ELSE %] >diff --git a/virtualshelves/addbybiblionumber.pl b/virtualshelves/addbybiblionumber.pl >index cfbde23b682..36b73b41441 100755 >--- a/virtualshelves/addbybiblionumber.pl >+++ b/virtualshelves/addbybiblionumber.pl >@@ -202,13 +202,16 @@ for my $biblionumber (@biblionumbers) { > } > ); > } >-$template->param( >- multiple => ( scalar(@biblios) > 1 ), >- total => scalar @biblios, >- biblios => \@biblios, >-); >+ >+if ( scalar(@biblios) < 1 ) { >+ $errcode = 3; >+ $authorized = 0; # trigger error screen >+} > > $template->param( >+ multiple => ( scalar(@biblios) > 1 ), >+ total => scalar @biblios, >+ biblios => \@biblios, > newshelf => $newshelf || 0, > authorized => $authorized, > errcode => $errcode, >-- >2.39.5
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 40585
:
185080
|
185439
| 185440