https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18291
Jonathan Druart <jonathan.dru...@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.dru...@bugs.koha-c | |ommunity.org Status|Signed Off |Failed QA --- Comment #6 from Jonathan Druart <jonathan.dru...@bugs.koha-community.org> --- Alex, There are several things wrong in these patches: 1. The test you added to t/db_dependent/sysprefs.t does not test the new method you added to Koha::Config::SysPref 2. For modules based on Koha::Object[s], we have 2 modules: Koha::Config::Syspref and Koha::Config::Sysprefs (notice the s at the end). One if for a single record, the other one is for collection/list. Modules based on Koha::Object[s] already provide you a lot of CRUD functionalities, without doing anything in the module. For instance Koha::Config::Sysprefs->find( $variable ) will return an object representing the system preference $variable. It is exactly what you are doing with your new method. 3. To access sysprefs you need to call C4::Context->preference. This subroutine uses a cache and is the one to call to access sysprefs. I do not see a valid reason not to fetch the in cache values here, so a 1 line patch should do the trick ;) -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/