summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-05-21 20:14:53 +0200
committerDylan William Hardison <dylan@hardison.net>2018-06-28 22:41:56 +0200
commit3d8dc32afa0131e2ac0cd121b492aed8ad59fc11 (patch)
tree2d3489acbaa726ff7daaee0758c2bbd50c8fe13a /Bugzilla.pm
parent15661bf793105352c3cf0d84d6c7e790be838a78 (diff)
downloadbugzilla-3d8dc32afa0131e2ac0cd121b492aed8ad59fc11.tar.gz
bugzilla-3d8dc32afa0131e2ac0cd121b492aed8ad59fc11.tar.xz
working more
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r--Bugzilla.pm16
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 {