summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Quantum.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Quantum.pm')
-rw-r--r--Bugzilla/Quantum.pm11
1 files changed, 11 insertions, 0 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 => '' } );