diff options
-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( |