]> 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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 8 Feb 2021 13:55:59 +0000 (14:55 +0100)
commitbab6a08ac98c1e6a72b346d554f020c0943e243d
tree747027a22975e301a1cb1c3cbfbaac9cc3952f56
parent940c0e319a1df9fb2d218d816079b5f5034972f0
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>
installer/data/mysql/updatedatabase.pl