]> git.koha-community.org Git - koha.git/commit
Bug 27466: Don't use set_preference from updatedatabase.pl
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 20 Jan 2021 10:16:48 +0000 (11:16 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 12 Feb 2021 12:46:39 +0000 (13:46 +0100)
commitbc2e3e0d460d856c1b21a52c084697b9800013ff
tree17d6615e658b7e774435a56672dee21ee7160f0d
parentaea5a5800a6a4aead6e8fa61fd8a12d2e9b5f1e4
Bug 27466: Don't use set_preference from updatedatabase.pl

We must never use subroutines or methods from updatedatabase.pl!

Having it using C4::Context->set_preference will call
Koha::Config::Syspref->store then C4::Log::logaction and finally
Koha::Logger->get which will need the log4perl configured correctly
(which is not necessary the case when you upgrade).

Test plan:
git checkout ed3e4540d73c1c3009375ad339e09a2e676fa1bd (20.06.00.022)
reset_all
Set the value of QuoteOfTheDay to 0
git checkout bug_27466 (master + this patch)
updatedatabase
=> QuoteOfTheDay is an empty string
git checkout ed3e4540d73c1c3009375ad339e09a2e676fa1bd (20.06.00.022)
reset_all
Set the value of QuoteOfTheDay to 1
git checkout bug_27466 (master + this patch)
updatedatabase
=> QuoteOfTheDay is set to "opac"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bab6a08ac98c1e6a72b346d554f020c0943e243d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
installer/data/mysql/updatedatabase.pl