summaryrefslogtreecommitdiffstats
path: root/Bugzilla/UserAgent.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/UserAgent.pm')
-rw-r--r--Bugzilla/UserAgent.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/UserAgent.pm b/Bugzilla/UserAgent.pm
index 62d6115a9..9c8686f0c 100644
--- a/Bugzilla/UserAgent.pm
+++ b/Bugzilla/UserAgent.pm
@@ -183,7 +183,7 @@ use constant OS_MAP => (
);
sub detect_platform {
- my $userAgent = $ENV{'HTTP_USER_AGENT'} || '';
+ my $userAgent = shift || Bugzilla->cgi->user_agent || '';
my @detected;
my $iterator = natatime(2, PLATFORMS_MAP);
while (my($re, $ra) = $iterator->()) {
@@ -195,7 +195,7 @@ sub detect_platform {
}
sub detect_op_sys {
- my $userAgent = $ENV{'HTTP_USER_AGENT'} || '';
+ my $userAgent = shift || Bugzilla->cgi->user_agent || '';
my @detected;
my $iterator = natatime(2, OS_MAP);
while (my($re, $ra) = $iterator->()) {