[Koha-bugs] [Bug 20496] Consolidate the checks to see if plugins are enabled in Koha::Plugin::new
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Mar 29 17:18:18 CEST 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20496
M. Tompsett <mtompset at hotmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mtompset at hotmail.com
--- Comment #2 from M. Tompsett <mtompset at hotmail.com> ---
(In reply to Kyle M Hall from comment #1)
> Point of note, we check two different things:
> 1) Is UseKohaPlugins enabled
> 2) Is enabled_plugins set in the Koha config file
>
> I think we should have a method in Koha::Plugins that checks both and
> returns true/false. If there are any parts of Koha that only check one for a
> good reason, we can have another method to check just that.
Or you could return a hashref.
Configured => true/false # true when both syspref and config
Failures => [systempreference,config,other] # an array with what fails
Then:
my $rv = Koha::Plugins->configured();
if ( $rv->{Configured} ) { ... }
or perhaps
if ( $rv->{Configured} || ! grep { $_ eq 'systempreference' } @{$rv->Failures}
) {
...
}
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list