Bugzilla – Attachment 122473 Details for
Bug 20310
Article requests: Use details from the host record when submitting an article request on an analytic record without attached items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20310: (follow-up) Check if biblio exists; 755 host_record.t
Bug-20310-follow-up-Check-if-biblio-exists-755-hos.patch (text/plain), 1.51 KB, created by
Martin Renvoize (ashimema)
on 2021-06-28 13:10:24 UTC
(
hide
)
Description:
Bug 20310: (follow-up) Check if biblio exists; 755 host_record.t
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-06-28 13:10:24 UTC
Size:
1.51 KB
patch
obsolete
>From 19d1171175aec384166e2aea74eed3147378bb1b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 9 Apr 2021 07:39:49 +0000 >Subject: [PATCH] Bug 20310: (follow-up) Check if biblio exists; 755 > host_record.t > >In order to prevent an error like: >Can't call method "host_record" on an undefined value at opac/opac-request-article.pl > >Also chmod's host_record.t to 755 (File must have the exec flag) > >Test plan: >Change the URL so that the biblionumber does not exist. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > opac/opac-request-article.pl | 4 ++++ > t/db_dependent/Koha/Biblio/host_record.t | 0 > 2 files changed, 4 insertions(+) > mode change 100644 => 100755 t/db_dependent/Koha/Biblio/host_record.t > >diff --git a/opac/opac-request-article.pl b/opac/opac-request-article.pl >index 4291fd2571..eb50d8f0da 100755 >--- a/opac/opac-request-article.pl >+++ b/opac/opac-request-article.pl >@@ -40,6 +40,10 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > my $action = $cgi->param('action') || q{}; > my $biblionumber = $cgi->param('biblionumber'); > my $biblio = Koha::Biblios->find($biblionumber); >+if( !$biblio ) { >+ print $cgi->redirect("/cgi-bin/koha/errors/404.pl"); >+ exit; >+} > > if ( $action eq 'create' ) { > my $branchcode = $cgi->param('branchcode'); >diff --git a/t/db_dependent/Koha/Biblio/host_record.t b/t/db_dependent/Koha/Biblio/host_record.t >old mode 100644 >new mode 100755 >-- >2.20.1
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 20310
:
73142
|
73143
|
73805
|
73998
|
74000
|
74992
|
74993
|
74994
|
88887
|
88888
|
88889
|
109750
|
109751
|
109752
|
109753
|
111467
|
111468
|
111469
|
111470
|
118976
|
118977
|
118978
|
118979
|
119346
|
122469
|
122470
|
122471
|
122472
|
122473
|
122474
|
122475
|
122725
|
122726
|
122727
|
122728
|
122729
|
122730
|
122731
|
122732