]> git.koha-community.org Git - koha.git/commit
Bug 37872: Add guards for enable_plugins
authorAndreas Jonsson <andreas.jonsson@kreablo.se>
Mon, 9 Sep 2024 16:51:10 +0000 (16:51 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Thu, 7 Nov 2024 15:29:12 +0000 (16:29 +0100)
commit5ebffcff284d95830f9f054e916aa39a05963baa
treec804a9e9c29a6a35cf75d68585587cd2dda7114d
parent6f3a55d2a36a37510950b1c4c179cabad79af301
Bug 37872: Add guards for enable_plugins

There are ILL-backends that are not implemented as
Koha plugins and does not require plugins to be enabled.

The 'new' method in Koha::Plugins returns undefined if
plugins are disabled.  Therefore, calls to this method
must be guarded by a check that plugins actually are enabled.

Testplan for koha-testing-docker:

- Edit /etc/koha/sites/kohadev/koha-conf.xml and disable plugins by
  setting <enable_plugins>0</enable_plugins>
- sudo koha-mysql kohadev -e "UPDATE systempreferences SET value='1' WHERE variable='ILLModule';"
- Run restart_all.
- In staff interface, go to About koha -> System information. The page
  should load normally (as opposed to returning 500 internal server
  error).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Koha/ILL/Request/Config.pm