From 1ff769beca6c689045f72526dfe535f710e68297 Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Tue, 29 Sep 2020 11:43:00 +0200
Subject: [PATCH] Bug 26562: Removes 'searches' from localStorage on logout

A user recently logged in will inherit the "searches" item stored in localStorage.

To recreate:
Log in with user A, do some searches
Note that the "searches" item is filled in with the search queries
Logout and log in with user B
Note that the "searches" item is still there
---
 koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js
index 1db84b3d58..29ba0d9805 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js
+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js
@@ -180,6 +180,7 @@ function logOut(){
     clearHoldFor();
     removeLastBorrower();
     localStorage.removeItem("sql_reports_activetab");
+    localStorage.removeItem("searches");
 }
 
 function openHelp(){
-- 
2.20.1