Bugzilla – Attachment 143798 Details for
Bug 20207
Anonymous suggestions show in OPAC even when OPACViewOthersSuggestions is set to 'Don't show'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20207: Anonymous Purchase Suggestions show on OPAC even when OPACViewOthersSuggestions is set to Don't Show
Bug-20207-Anonymous-Purchase-Suggestions-show-on-O.patch (text/plain), 2.86 KB, created by
David Nind
on 2022-11-11 20:33:42 UTC
(
hide
)
Description:
Bug 20207: Anonymous Purchase Suggestions show on OPAC even when OPACViewOthersSuggestions is set to Don't Show
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-11-11 20:33:42 UTC
Size:
2.86 KB
patch
obsolete
>From 0b46a1048b0d617de02f5840267ebddc6a7ace9e Mon Sep 17 00:00:00 2001 >From: Mark Hofstetter <mark@hofstetter.at> >Date: Fri, 11 Nov 2022 13:38:08 +0100 >Subject: [PATCH] Bug 20207: Anonymous Purchase Suggestions show on OPAC even > when OPACViewOthersSuggestions is set to Don't Show > >When you enable AnonSuggestions and ALLOW patrons that aren't logged in to make purchase suggestions, once a suggestion has successfully been submitted, Anonymous Purchase Suggestions will show on OPAC even when system preference OPACViewOthersSuggestions, is set to Don't Show. > >The suggestions will show on opac-suggestions.pl. However, if you search for the title you suggested, you will get a message saying "You are not authorized to see pending purchase suggestions." > >This patch fixes the error, ie if OPACViewOthersSuggestions is set to false not other suggestions are shown (if you are not logged in and AnonSuggestions) OR ONLY your own suggestions if you are logged in > >To test: >1) activate AnonSuggestions >2) create an anon suggestion >3) create a suggestion with a logged in user >4) toggle OPACViewOthersSuggestions Show/Don't show >5) all suggestions are shown cgi-bin/koha/opac-suggestions.pl in either case >6) apply patch >7) OPACViewOthersSuggestions is now respected ie suggestions from other users are only shown if activated >8) Please sign off > >Sponsored-by: Library of the Natural History Museum Vienna > >Signed-off-by: David Nind <david@davidnind.com> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >index b0613c33db..e62f951682 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >@@ -373,7 +373,8 @@ > </div> > [% END %] > >- <table id="suggestt" class="table table-bordered table-striped"> >+ [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 || loggedinusername %] >+ <table id="suggestt" class="table table-bordered tabled"> > <caption class="sr-only">Your purchase suggestions<caption> > <thead> > <tr> >@@ -456,6 +457,7 @@ > [% END # / FOREACH suggestions %] > </tbody> > </table> >+ [% END %] > > [% IF ( loggedinusername && can_delete_suggestion ) %] > <fieldset class="action"> >-- >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 20207
:
143789
|
143798
|
143800
|
143811
|
143812