diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-05-21 20:14:53 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-06-28 22:41:56 +0200 |
commit | 3d8dc32afa0131e2ac0cd121b492aed8ad59fc11 (patch) | |
tree | 2d3489acbaa726ff7daaee0758c2bbd50c8fe13a /Bugzilla.pm | |
parent | 15661bf793105352c3cf0d84d6c7e790be838a78 (diff) | |
download | bugzilla-3d8dc32afa0131e2ac0cd121b492aed8ad59fc11.tar.gz bugzilla-3d8dc32afa0131e2ac0cd121b492aed8ad59fc11.tar.xz |
working more
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r-- | Bugzilla.pm | 16 |
1 files changed, 13 insertions, 3 deletions
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 { |