Bug 20864: Only set bibs_selected cookie when BrowseResultSelection is activated
authorOwen Leonard <oleonard@myacpl.org>
Mon, 4 Jun 2018 13:52:28 +0000 (13:52 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 27 Jun 2018 10:38:04 +0000 (11:38 +0100)
commit6f5952023c615e72d3fe36aafe3b5fd82c8794fd
tree7c740f3a44f7d216a2844aa63c3c29c9773b018c
parentc528c05f303d1d4c99680ebf61fb78a79b92bedf
Bug 20864: Only set bibs_selected cookie when BrowseResultSelection is activated

This patch adds a system preference check around the call to the
JavaScript include which sets the bibs_selected cookie. With
BrowseResultsSelection disabled, the cookie should never be set.

To test you should be using a browser with a tool for inspecting
cookies. View the cookies for your Koha domain under each of these
conditions, clearing cookies between each step:

Without the patch applied:

 - With  BrowseResultSelection enabled, search for any item. Your cookie
   tool should report that you have a bibs_selected cookie stored.
 - With BrowseResultSelection disabled, search for any item. You should
   have a bibs_selected cookie.

With the patch applied:

 - With the BrowseResultSelection system preference enabled, search for
   any item. Your cookie tool should report that you have a
   bibs_selected cookie stored.
 - With BrowseResultSelection disabled, search for any item. You should
   have no bibs_selected cookie.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc