From 3d8dc32afa0131e2ac0cd121b492aed8ad59fc11 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Mon, 21 May 2018 14:14:53 -0400 Subject: working more --- Bugzilla.pm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'Bugzilla.pm') diff --git a/Bugzilla.pm b/Bugzilla.pm index 556daf752..fc17575b8 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -194,11 +194,21 @@ sub init_page { ##################################################################### sub template { - my (undef, $template) = @_; - request_cache->{template} //= $template // Bugzilla::Template->create(); + request_cache->{template} // Bugzilla::Template->create(); request_cache->{template}->{_is_main} = 1; - return request_cache->{template}; + if (Bugzilla->cgi->server_software eq 'Bugzilla::Quantum::CGI') { + return request_cache->{quantum_template} //= do { + my $template = request_cache->{template}; + my $c = request_cache->{mojo_controller}; + my $q_template = Bugzilla::Quantum::Template->new( controller => $c, template => $template ); + $q_template->{_is_main} = 1; + $q_template; + }; + } + else { + return request_cache->{template}; + } } sub template_inner { -- cgit v1.2.3-24-g4f1b