diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-08-01 05:49:38 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-08-20 23:52:52 +0200 |
commit | ef2ec2c8682d51a9a4d21c4f431ce0f9f1ae0d88 (patch) | |
tree | afeba4fb2b0ac3b879c252dc50dfa307ad14ac25 | |
parent | 8dda66ee78df54d38d86c7e7ed0c8695fec78e40 (diff) | |
download | bugzilla-ef2ec2c8682d51a9a4d21c4f431ce0f9f1ae0d88.tar.gz bugzilla-ef2ec2c8682d51a9a4d21c4f431ce0f9f1ae0d88.tar.xz |
Fix a module loading problem
-rw-r--r-- | Bugzilla/Quantum.pm | 11 | ||||
-rw-r--r-- | Bugzilla/Quantum/Plugin/Glue.pm | 8 |
2 files changed, 12 insertions, 7 deletions
diff --git a/Bugzilla/Quantum.pm b/Bugzilla/Quantum.pm index 135ff94a9..8d46833c4 100644 --- a/Bugzilla/Quantum.pm +++ b/Bugzilla/Quantum.pm @@ -21,6 +21,8 @@ use Bugzilla::Logging; use Bugzilla::Quantum::CGI; use Bugzilla::Quantum::SES; use Bugzilla::Quantum::Static; +use Mojo::Loader qw( find_modules ); +use Module::Runtime qw( require_module ); use Bugzilla::Util (); use Cwd qw(realpath); use MojoX::Log::Log4perl::Tiny; @@ -36,7 +38,14 @@ sub startup { $self->plugin('Bugzilla::Quantum::Plugin::BlockIP'); $self->plugin('Bugzilla::Quantum::Plugin::BasicAuth'); + Bugzilla::Extension->load_all(); if ( $self->mode ne 'development' ) { + Bugzilla->preload_features(); + DEBUG('preloading templates'); + Bugzilla->preload_templates(); + DEBUG('done preloading templates'); + require_module($_) for find_modules('Bugzilla::User::Setting'); + $self->hook( after_static => sub { my ($c) = @_; @@ -49,6 +58,8 @@ sub startup { Bugzilla::Quantum::CGI->load_all($r); Bugzilla::Quantum::CGI->load_one( 'bzapi_cgi', 'extensions/BzAPI/bin/rest.cgi' ); + Bugzilla::WebService::Server::REST->preload; + $r->any('/')->to('CGI#index_cgi'); $r->any('/rest')->to('CGI#rest_cgi'); $r->any('/rest.cgi/*PATH_INFO')->to( 'CGI#rest_cgi' => { PATH_INFO => '' } ); diff --git a/Bugzilla/Quantum/Plugin/Glue.pm b/Bugzilla/Quantum/Plugin/Glue.pm index ea21429bd..ded4daf15 100644 --- a/Bugzilla/Quantum/Plugin/Glue.pm +++ b/Bugzilla/Quantum/Plugin/Glue.pm @@ -67,13 +67,7 @@ sub register { } ); - Bugzilla::Extension->load_all(); - if ( $app->mode ne 'development' ) { - Bugzilla->preload_features(); - DEBUG('preloading templates'); - Bugzilla->preload_templates(); - DEBUG('done preloading templates'); - } + $app->secrets( [ Bugzilla->localconfig->{side_wide_secret} ] ); $app->renderer->add_handler( |