]> git.koha-community.org Git - koha.git/commit
Bug 14148: marc import broken if plugins are not enabled
authorTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 5 May 2015 14:12:31 +0000 (11:12 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 6 May 2015 15:44:46 +0000 (12:44 -0300)
commit115c4f348eb89e6eb0f25a823265d11135d72788
tree4d56dca51f83202f61bf654897c91528a16dfb61
parenteaaf290073dc50d0427732dbc1dd98d330a4b1ce
Bug 14148: marc import broken if plugins are not enabled

Bug 12412 introduced a way to use plugins to generate MARC records
out of any arbitrary format. But failed to properly check for
a valid configuration (plugins_enabled entry on koha-conf.xml, and
even the UseKohaPlugins syspref).

This patch makes tools/stage-marc-import.pl test for the required
configuration before attempting to create the Koha::Plugins object.

To test:
1/ Make sure you don't have a plugins_enabled entry on your koha-conf.xml file
2/ On master, browse to tools/stage-marc-import.pl
=> FAIL: You get a nasty "Can't call method "GetPlugins"..." error
3/ Apply the patch and reload
=> SUCCESS: Stage MARC for import page renders correctly

Repeat with plugins_enabled == 0 and == 1. Also UseKohaPlugins enabled/disabled.
It should work as expected.

Regards
Tomas

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described, no koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
tools/stage-marc-import.pl