Bugzilla – Attachment 97717 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.48 KB, created by
Marcel de Rooy
on 2020-01-22 12:47:19 UTC
(
hide
)
Description:
Bug 24345: Fix process of suggesting purchase of existing title for non-logged-in users
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2020-01-22 12:47:19 UTC
Size:
2.48 KB
patch
obsolete
>From 04d03fdd69b8dd8dd4e364f8931b56602d0493a0 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 >Content-Type: text/plain; charset=utf-8 > >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> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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 9f7337be62..a2e4d1439e 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