From 701bce97f5791b837a386e16deb7c685171cdb87 Mon Sep 17 00:00:00 2001 From: Andrew Fuerste-Henry Date: Wed, 29 Sep 2021 19:24:13 +0000 Subject: [PATCH] Bug 29138: Use zero instead of no in LoadSearchHistoryToTheFirstLoggedUser To test: - apply patch - set LoadSearchHistoryToTheFirstLoggedUser to 'Don't add' - confirm via sql that value=0 - confirm on OPAC that search history is not loaded to account on login Signed-off-by: David Nind Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- installer/data/mysql/atomicupdate/Bug_29138.pl | 17 +++++++++++++++++ .../en/modules/admin/preferences/searching.pref | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/Bug_29138.pl diff --git a/installer/data/mysql/atomicupdate/Bug_29138.pl b/installer/data/mysql/atomicupdate/Bug_29138.pl new file mode 100755 index 0000000000..731099f8ac --- /dev/null +++ b/installer/data/mysql/atomicupdate/Bug_29138.pl @@ -0,0 +1,17 @@ +use Modern::Perl; + +return { + bug_number => "29138", + description => "Use a zero instead of a no in LoadSearchHistoryToTheFirstLoggedUser", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + # Do you stuffs here + $dbh->do(q{ + UPDATE systempreferences SET value= IF(value='no',0,1) + WHERE variable = 'LoadSearchHistoryToTheFirstLoggedUser'; + }); + # Print useful stuff here + say $out "LoadSearchHistoryToTheFirstLoggedUser updated"; + }, +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref index 1130c2cf29..ee43066b2b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -93,7 +93,7 @@ Searching: default: 0 choices: 1: "Add" - no : "Don't add" + 0: "Don't add" - search history of the unlogged user to the next patron logging in. - - Show tabs in the OPAC and staff interface advanced search for limiting searches on the -- 2.39.5