Bugzilla – Attachment 96830 Details for
Bug 24345
Fix process of suggesting purchase of existing title for non-logged-in users
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24345: Fix process of suggesting purchase of existing title for non-logged-in users
Bug-24345-Fix-process-of-suggesting-purchase-of-ex.patch (text/plain), 2.39 KB, created by
Owen Leonard
on 2020-01-05 21:14:29 UTC
(
hide
)
Description:
Bug 24345: Fix process of suggesting purchase of existing title for non-logged-in users
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-01-05 21:14:29 UTC
Size:
2.39 KB
patch
obsolete
>From 5a25d4fdf13b50bbc3aba1b7d9b3579da9ee5237 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sun, 5 Jan 2020 22:02:18 +0100 >Subject: [PATCH] Bug 24345: Fix process of suggesting purchase of existing > title for non-logged-in users > >The 'op' parameter is removed from the CGI object ($input) before >get_template_and_user is called. When the user is redirected to the >login form (from checkauth, called from get_template_and_user), the >op is lost. > >Moving down the deletion fixes the problem. > >Test plan: >Logout at the OPAC >Go the detail page of a bibliographic record >Click the "Suggest for purchase" link >Fill the login form >=> Without this patch you will see your suggestion list >=> With this patch applied the new suggestion form will be displayed, >prefilled with the biblio's info > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > opac/opac-suggestions.pl | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > >diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl >index b502e92737..7593a3529b 100755 >--- a/opac/opac-suggestions.pl >+++ b/opac/opac-suggestions.pl >@@ -47,10 +47,6 @@ my $need_confirm = 0; > if ($negcaptcha ) { > print $input->redirect("/cgi-bin/koha/opac-suggestions.pl"); > exit; >-} else { >- # don't pass 'negcap' column to DB, else DBI::Class will error >- # DBIx::Class::Row::store_column(): No such column 'negcap' on Koha::Schema::Result::Suggestion at Koha/C4/Suggestions.pm >- delete $suggestion->{negcap}; > } > > #If suggestions are turned off we redirect to 404 error. This will also redirect guest suggestions >@@ -59,9 +55,6 @@ if ( ! C4::Context->preference('suggestion') ) { > exit; > } > >-delete $suggestion->{$_} foreach qw<op suggested_by_anyone confirm>; >-$op = 'else' unless $op; >- > my ( $template, $borrowernumber, $cookie, @messages ); > my $deleted = $input->param('deleted'); > my $submitted = $input->param('submitted'); >@@ -87,6 +80,12 @@ else { > ); > } > >+# don't pass 'negcap' column to DB, else DBI::Class will error >+# DBIx::Class::Row::store_column(): No such column 'negcap' on Koha::Schema::Result::Suggestion at Koha/C4/Suggestions.pm >+delete $suggestion->{negcap}; >+delete $suggestion->{$_} foreach qw<op suggested_by_anyone confirm>; >+$op = 'else' unless $op; >+ > if ( $op eq 'else' ) { > if ( C4::Context->preference("OPACViewOthersSuggestions") ) { > if ( $borrowernumber ) { >-- >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 24345
:
96829
|
96830
|
97651
|
97717
|
97718