From e86fa4e731fb879bd8bd9c3afa3eca30730b9b13 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Thu, 12 Jul 2018 19:00:30 -0400 Subject: bump version to 20180712.1 --- Bugzilla.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bugzilla.pm') diff --git a/Bugzilla.pm b/Bugzilla.pm index a1995d472..6fcd326d1 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -22,7 +22,7 @@ BEGIN { } } -our $VERSION = '20180703.1'; +our $VERSION = '20180712.1'; use Bugzilla::Auth; use Bugzilla::Auth::Persist::Cookie; -- cgit v1.2.3-24-g4f1b From 2d5dcb1f4ae8fe01625adb7469d21008b72892c9 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Tue, 17 Jul 2018 09:53:06 -0400 Subject: bump version to 20180717.1 --- Bugzilla.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bugzilla.pm') diff --git a/Bugzilla.pm b/Bugzilla.pm index 6fcd326d1..9e4edc5cf 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -22,7 +22,7 @@ BEGIN { } } -our $VERSION = '20180712.1'; +our $VERSION = '20180717.1'; use Bugzilla::Auth; use Bugzilla::Auth::Persist::Cookie; -- cgit v1.2.3-24-g4f1b From 40a8efb9cf0cf27335a34097653f82f943caf5a2 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Tue, 17 Jul 2018 10:18:25 -0400 Subject: bump version to 20180717.2 --- Bugzilla.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bugzilla.pm') diff --git a/Bugzilla.pm b/Bugzilla.pm index 9e4edc5cf..29675865b 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -22,7 +22,7 @@ BEGIN { } } -our $VERSION = '20180717.1'; +our $VERSION = '20180717.2'; use Bugzilla::Auth; use Bugzilla::Auth::Persist::Cookie; -- cgit v1.2.3-24-g4f1b From 345e686485e484e087ea58c988e4831209c39554 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Mon, 23 Jul 2018 11:25:43 -0400 Subject: Bug 1476841 - Various code cleanups ahead of the Mojolicious patch --- Bugzilla.pm | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'Bugzilla.pm') diff --git a/Bugzilla.pm b/Bugzilla.pm index 29675865b..73d080395 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -13,15 +13,6 @@ use warnings; use Bugzilla::Logging; -# We want any compile errors to get to the browser, if possible. -BEGIN { - # This makes sure we're in a CGI. - if ($ENV{SERVER_SOFTWARE} && !$ENV{MOD_PERL}) { - require CGI::Carp; - CGI::Carp->import('fatalsToBrowser'); - } -} - our $VERSION = '20180717.2'; use Bugzilla::Auth; @@ -202,8 +193,17 @@ sub init_page { # Subroutines and Methods ##################################################################### +my $preload_templates = 0; +sub preload_templates { + $preload_templates = 1; + + delete request_cache->{template}; + template(); + return 1; +} + sub template { - request_cache->{template} ||= Bugzilla::Template->create(); + request_cache->{template} //= Bugzilla::Template->create(preload => $preload_templates); request_cache->{template}->{_is_main} = 1; return request_cache->{template}; @@ -214,7 +214,8 @@ sub template_inner { my $cache = request_cache; my $current_lang = $cache->{template_current_lang}->[0]; $lang ||= $current_lang || ''; - return $cache->{"template_inner_$lang"} ||= Bugzilla::Template->create(language => $lang); + my %options = (language => $lang, preload => $preload_templates); + return $cache->{"template_inner_$lang"} ||= Bugzilla::Template->create(%options); } sub extensions { @@ -234,7 +235,7 @@ sub extensions { } sub cgi { - return request_cache->{cgi} ||= new Bugzilla::CGI(); + return request_cache->{cgi} ||= Bugzilla::CGI->new; } sub input_params { @@ -340,9 +341,6 @@ sub login { return $class->user if $class->user->id; - # Load all extensions here if not running under mod_perl - $class->extensions unless $ENV{MOD_PERL}; - my $authorizer = new Bugzilla::Auth(); $type = LOGIN_REQUIRED if $class->cgi->param('GoAheadAndLogIn'); -- cgit v1.2.3-24-g4f1b From 6df945da5900da86203e0527816690cb1d52c574 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Tue, 3 Apr 2018 23:05:04 -0400 Subject: Bug 1455495 - Replace apache with Mojolicious --- Bugzilla.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bugzilla.pm') diff --git a/Bugzilla.pm b/Bugzilla.pm index 73d080395..4795a3f3a 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -801,7 +801,7 @@ sub check_rate_limit { my $limit = join("/", @$limit); Bugzilla->audit("[rate_limit] action=$action, ip=$ip, limit=$limit, name=$name"); if ($action eq 'block') { - Bugzilla::ModPerl::BlockIP->block_ip($ip); + $Bugzilla::Quantum::CGI::C->block_ip($ip); ThrowUserError("rate_limit"); } } -- cgit v1.2.3-24-g4f1b From 8ca2304eea840e37bcf182f21e2c14bd21ad9cd7 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Mon, 23 Jul 2018 11:24:13 -0400 Subject: more tidy --- Bugzilla.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'Bugzilla.pm') diff --git a/Bugzilla.pm b/Bugzilla.pm index 4795a3f3a..6aa1ab602 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -817,6 +817,7 @@ sub markdown_parser { # Per-process cleanup. Note that this is a plain subroutine, not a method, # so we don't have $class available. +*cleanup = \&_cleanup; sub _cleanup { return if $^C; -- cgit v1.2.3-24-g4f1b