From 103fe109b22b48d506848a0a1bc43556c9dfda4b Mon Sep 17 00:00:00 2001 From: David Bourgault Date: Mon, 27 Nov 2017 16:05:48 -0500 Subject: [PATCH] Bug 19702: Correct cookie path in Basket.js MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This corrects the cookie path in bootstrap/js/basket.js. It used to take the default value (current page path), but will now be "/" Test plan: 0) Visit the OPAC, add a book to your basket 1) Navigate to the OPAC's homepage (www.domain.com, without the /cgi-bin/koha) -> The basket will display as empty 2) Apply patch 3) Clear your cookies and your cache 4) Redo step 1) -> Basket will display correctly Patch applies without issue and functions as descibed. Signed-off-by: Dilan Johnpullé Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- koha-tmpl/opac-tmpl/bootstrap/js/basket.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/basket.js b/koha-tmpl/opac-tmpl/bootstrap/js/basket.js index a4227535a6..ac5b1cdcc4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/basket.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/basket.js @@ -19,10 +19,10 @@ function basketCount(){ function writeCookie(name, val, wd) { if (wd) { - parent.opener.document.cookie = name + "=" + val; + parent.opener.document.cookie = name + "=" + val + ";path=/"; } else { - parent.document.cookie = name + "=" + val; + parent.document.cookie = name + "=" + val + ";path=/"; } } -- 2.39.5