]> git.koha-community.org Git - koha.git/commit
Bug 10952: Store anonymous search history in session
authorJulian Maurice <julian.maurice@biblibre.com>
Thu, 26 Sep 2013 09:22:26 +0000 (11:22 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 18 Feb 2014 09:14:40 +0000 (10:14 +0100)
commit6e5201e924fc74a6828064c54863a986f8ac825d
treec97882bc99bcd24c25b4aa538f0fa9b52dda69b0
parent04f1f23bcd0e631ff98f6b7a3a27de0f47dee252
Bug 10952: Store anonymous search history in session

Storing search history into cookie can cause problems, due to the size
limitation of 4KB.

The solution here is to store search history into the CGI::Session
object, so there is no size limitation (but anonymous search history
still remember up to 15 requests max.)

Test plan:
- Go to OPAC in anonymous mode.
- Check that the "Search history" link is *not* shown in the top right
  corner of the page
- Make some searches on /cgi-bin/koha/opac-search.pl
- The "Search history" link should appear. Click.
- Your search history should be displayed.
- Try to log in with invalid username/password
- Go back to search history, it's still there
- Now log in with valid username/password
- Your anonymous search history should be saved into your own search
  history.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Restoring original sign offs and comments below

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors

Well, search history saving is similar before and after patch.
i.e. anonmymous search is saved when user logs in, but cookie
KohaOpacRecentSearches is empty.
Shows current an previous session searches

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
All tests and QA script pass, works as described.

Signed-off-by: Charlene Criton <charlene.criton@univ-lyon2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d07df7d51250bb5a40bb556aab48afb18a67a396)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Auth.pm
koha-tmpl/opac-tmpl/prog/en/modules/opac-search-history.tt
opac/opac-search-history.pl
opac/opac-search.pl