summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla.pm8
-rw-r--r--Bugzilla/Install/Filesystem.pm4
-rw-r--r--Bugzilla/Metrics/Collector.pm5
3 files changed, 14 insertions, 3 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm
index 233cc4323..52a44e375 100644
--- a/Bugzilla.pm
+++ b/Bugzilla.pm
@@ -697,8 +697,14 @@ sub process_cache {
sub metrics_enabled {
if (defined $_[1]) {
+ if (!$_[1]
+ && $_[0]->request_cache->{metrics_enabled}
+ && $_[0]->request_cache->{metrics})
+ {
+ $_[0]->request_cache->{metrics}->cancel();
+ delete $_[0]->request_cache->{metrics};
+ }
$_[0]->request_cache->{metrics_enabled} = $_[1];
- delete $_[0]->request_cache->{metrics} unless $_[1];
}
else {
return $_[0]->request_cache->{metrics_enabled};
diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm
index c8a951deb..cd1e76916 100644
--- a/Bugzilla/Install/Filesystem.pm
+++ b/Bugzilla/Install/Filesystem.pm
@@ -159,8 +159,8 @@ sub FILESYSTEM {
'runtests.pl' => { perms => OWNER_EXECUTE },
'jobqueue.pl' => { perms => OWNER_EXECUTE },
'migrate.pl' => { perms => OWNER_EXECUTE },
- 'sentry.pl' => { perms => OWNER_EXECUTE },
- 'metrics.pl' => { perms => OWNER_EXECUTE },
+ 'sentry.pl' => { perms => WS_EXECUTE },
+ 'metrics.pl' => { perms => WS_EXECUTE },
'install-module.pl' => { perms => OWNER_EXECUTE },
'Bugzilla.pm' => { perms => CGI_READ },
diff --git a/Bugzilla/Metrics/Collector.pm b/Bugzilla/Metrics/Collector.pm
index 7b2fc3f1b..2f9b6130d 100644
--- a/Bugzilla/Metrics/Collector.pm
+++ b/Bugzilla/Metrics/Collector.pm
@@ -42,6 +42,11 @@ sub end {
$self->{head} = $self->{head}->{parent} if $is_head;
}
+sub cancel {
+ my ($self) = @_;
+ delete $self->{head};
+}
+
sub DESTROY {
my ($self) = @_;
$self->finish() if $self->{head};