Bugzilla – Attachment 99129 Details for
Bug 24549
Cookies for last patron link are always set - even if showLastPatron is turned off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24549: Do not set "last patron" cookie if showLastPatron is disabled
Bug-24549-Do-not-set-last-patron-cookie-if-showLas.patch (text/plain), 2.23 KB, created by
Katrin Fischer
on 2020-02-17 20:08:39 UTC
(
hide
)
Description:
Bug 24549: Do not set "last patron" cookie if showLastPatron is disabled
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-02-17 20:08:39 UTC
Size:
2.23 KB
patch
obsolete
>From ade9967ca93ef91076c183196ae3aa831997682f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 12 Feb 2020 15:49:17 +0100 >Subject: [PATCH] Bug 24549: Do not set "last patron" cookie if showLastPatron > is disabled > >If the showLastPatron syspref is disabled, we should not store the 3 >cookies we use for this feature. > >Test plan: >0/ Do not apply this patch >1/ Turn off showLastPatron >2/ Search for a patron, click on a result >3/ Open the cookie list of your browser >=> You see 3 cookies named lastborrowercard, lastborrowername, >lastborrowernumber >4/ Remove them >5/ Apply the patch >6/ Reload the patron detail page >=> The 3 cookies are not created >7/ Turn the pref on >8/ Reload the patron detail page >=> The 3 cookies are created >9/ Eat one of them. > >QA note: it's a bit dirty, we should do that JS side, but >staff-global.js is too widely used to make the change easy. Any other >suggestions welcomed. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >index a8328bca4a..95ace5e248 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -3,9 +3,11 @@ > [% IF ( patron.borrowernumber ) %] > <div class="patroninfo"><h5>[% INCLUDE 'patron-title.inc' %]</h5> > >-<input type="hidden" id="hiddenborrowernumber" value="[% patron.borrowernumber | html %]"> >-<input type="hidden" id="hiddenborrowername" value="[% patron.surname | html %] [% patron.firstname | html %]"> >-<input type="hidden" id="hiddenborrowercard" value="[% patron.cardnumber | html %]"> >+[% IF Koha.Preference('showLastPatron') %] >+ <input type="hidden" id="hiddenborrowernumber" value="[% patron.borrowernumber | html %]"> >+ <input type="hidden" id="hiddenborrowername" value="[% patron.surname | html %] [% patron.firstname | html %]"> >+ <input type="hidden" id="hiddenborrowercard" value="[% patron.cardnumber | html %]"> >+[% END %] > > [% IF ( patronimages ) %] > <div> >-- >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 24549
:
98759
|
98991
| 99129