Bugzilla – Attachment 160456 Details for
Bug 35685
ILL - OPAC request creation error if submitted empty while ILLModuleDisclaimerByType is in use
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35685: Fix after creation actions
Bug-35685-Fix-after-creation-actions.patch (text/plain), 2.24 KB, created by
Pedro Amorim
on 2024-01-03 12:01:51 UTC
(
hide
)
Description:
Bug 35685: Fix after creation actions
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-01-03 12:01:51 UTC
Size:
2.24 KB
patch
obsolete
>From 3cdffe71deadef3b295446d6c9beaf52da66da13 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Wed, 3 Jan 2024 12:01:36 +0000 >Subject: [PATCH] Bug 35685: Fix after creation actions > >Test plan: > >1) Install FreeForm and enable ILLModule, run: > bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh) >2) Configure ILLModuleDisclaimerByType, visit: > /cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=ILLModuleDisclaimerByType > Click "edit" and paste the example code into the sys pref value >3) Create a new OPAC ILL request, visit: > /cgi-bin/koha/opac-illrequests.pl?method=create&backend=FreeForm >4) Dont put a type or branch, click 'Create', on the next screen click 'Submit' >5) Notice it explodes >6) Apply patch and repeat. It no longer explodes and now shows an error message. >--- > opac/opac-illrequests.pl | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) > >diff --git a/opac/opac-illrequests.pl b/opac/opac-illrequests.pl >index 5173b8da6c..935aa38e5e 100755 >--- a/opac/opac-illrequests.pl >+++ b/opac/opac-illrequests.pl >@@ -150,13 +150,6 @@ if ( $op eq 'list' ) { > $params->{opac} = 1; > my $backend_result = $request->backend_create($params); > >- # After creation actions >- if ( $params->{type_disclaimer_submitted} ) { >- $type_disclaimer->after_request_created( $params, $request ); >- print $query->redirect('/cgi-bin/koha/opac-illrequests.pl?message=2'); >- exit; >- } >- > if ($backend_result->{stage} eq 'copyrightclearance') { > $template->param( > stage => $backend_result->{stage}, >@@ -171,6 +164,14 @@ if ( $op eq 'list' ) { > ); > if ($backend_result->{stage} eq 'commit') { > print $query->redirect('/cgi-bin/koha/opac-illrequests.pl?message=2'); >+ >+ # After creation actions >+ if ( $params->{type_disclaimer_submitted} ) { >+ $type_disclaimer->after_request_created( $params, $request ); >+ print $query->redirect('/cgi-bin/koha/opac-illrequests.pl?message=2'); >+ exit; >+ } >+ > exit; > } > } >-- >2.30.2
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 35685
:
160456
|
160563
|
161503
|
164457