Summary: | Consolidate the checks to see if plugins are enabled in Koha::Plugin::new | ||
---|---|---|---|
Product: | Koha | Reporter: | Kyle M Hall (khall) <kyle> |
Component: | Architecture, internals, and plumbing | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | mtompset |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | 20181 | ||
Bug Blocks: |
Description
Kyle M Hall (khall)
2018-03-29 14:56:12 UTC
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. (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} ) { ... } |