|
Lines 22-40
use Modern::Perl;
Link Here
|
| 22 |
use vars qw($AUTOLOAD $context); |
22 |
use vars qw($AUTOLOAD $context); |
| 23 |
|
23 |
|
| 24 |
BEGIN { |
24 |
BEGIN { |
| 25 |
# Load plugins early to ensure they're available before any transactions begin |
|
|
| 26 |
my $enable_plugins = 0; |
| 27 |
if ( exists $ENV{'KOHA_CONF'} && -e $ENV{'KOHA_CONF'} ) { |
| 28 |
require Koha::Config; |
| 29 |
my $config = Koha::Config->get_instance; |
| 30 |
$enable_plugins = $config->get('enable_plugins') // 0; |
| 31 |
} |
| 32 |
|
| 33 |
if ($enable_plugins) { |
| 34 |
require Koha::Plugins::Loader; |
| 35 |
Koha::Plugins::Loader->get_enabled_plugins(); |
| 36 |
} |
| 37 |
|
| 38 |
if ( $ENV{'HTTP_USER_AGENT'} ) { # Only hit when plack is not enabled |
25 |
if ( $ENV{'HTTP_USER_AGENT'} ) { # Only hit when plack is not enabled |
| 39 |
|
26 |
|
| 40 |
# Redefine multi_param if cgi version is < 4.08 |
27 |
# Redefine multi_param if cgi version is < 4.08 |