summaryrefslogtreecommitdiffstats
path: root/enter_bug.cgi
diff options
context:
space:
mode:
authorbryce-mozilla%nextbus.com <>1999-05-04 09:05:26 +0200
committerbryce-mozilla%nextbus.com <>1999-05-04 09:05:26 +0200
commitdaffcd74e36eab5a9813f5187329fb396f8d7b6d (patch)
tree9cb91bbfa2c86234edfaeebeae88c739ff81d47c /enter_bug.cgi
parent720ac379ca88dec24a3db244b4fbeb2c694a9599 (diff)
downloadbugzilla-daffcd74e36eab5a9813f5187329fb396f8d7b6d.tar.gz
bugzilla-daffcd74e36eab5a9813f5187329fb396f8d7b6d.tar.xz
Add parameter "usebrowserinfo", to allow disabling the setting of OS and Platform
based on the brower the user makes the report from. Realign text box for narrower windows. Remove Mozilla-specific default parameter.
Diffstat (limited to 'enter_bug.cgi')
-rwxr-xr-xenter_bug.cgi88
1 files changed, 48 insertions, 40 deletions
diff --git a/enter_bug.cgi b/enter_bug.cgi
index 15d2571b9..0473a726c 100755
--- a/enter_bug.cgi
+++ b/enter_bug.cgi
@@ -83,28 +83,33 @@ sub pickplatform {
if ($value ne "") {
return $value;
}
- for ($ENV{'HTTP_USER_AGENT'}) {
- /Mozilla.*\(Windows/ && do {return "PC";};
- /Mozilla.*\(Macintosh/ && do {return "Macintosh";};
- /Mozilla.*\(Win/ && do {return "PC";};
- /Mozilla.*Linux.*86/ && do {return "PC";};
- /Mozilla.*Linux.*alpha/ && do {return "DEC";};
- /Mozilla.*OSF/ && do {return "DEC";};
- /Mozilla.*HP-UX/ && do {return "HP";};
- /Mozilla.*IRIX/ && do {return "SGI";};
- /Mozilla.*(SunOS|Solaris)/ && do {return "Sun";};
- # default
- return "Other";
+ if ( Param('usebrowserinfo') ) {
+ for ($ENV{'HTTP_USER_AGENT'}) {
+ /Mozilla.*\(Windows/ && do {return "PC";};
+ /Mozilla.*\(Macintosh/ && do {return "Macintosh";};
+ /Mozilla.*\(Win/ && do {return "PC";};
+ /Mozilla.*Linux.*86/ && do {return "PC";};
+ /Mozilla.*Linux.*alpha/ && do {return "DEC";};
+ /Mozilla.*OSF/ && do {return "DEC";};
+ /Mozilla.*HP-UX/ && do {return "HP";};
+ /Mozilla.*IRIX/ && do {return "SGI";};
+ /Mozilla.*(SunOS|Solaris)/ && do {return "Sun";};
+ }
}
+ # default
+ return "Other";
}
sub pickversion {
my $version = formvalue('version');
- if ($version eq "") {
- if ($ENV{'HTTP_USER_AGENT'} =~ m@Mozilla[ /]([^ ]*)@) {
- $version = $1;
+
+ if ( Param('usebrowserinfo') ) {
+ if ($version eq "") {
+ if ($ENV{'HTTP_USER_AGENT'} =~ m@Mozilla[ /]([^ ]*)@) {
+ $version = $1;
+ }
}
}
@@ -135,24 +140,26 @@ sub pickos {
if (formvalue('op_sys') ne "") {
return formvalue('op_sys');
}
- for ($ENV{'HTTP_USER_AGENT'}) {
- /Mozilla.*\(.*;.*; IRIX.*\)/ && do {return "IRIX";};
- /Mozilla.*\(.*;.*; 32bit.*\)/ && do {return "Windows 95";};
- /Mozilla.*\(.*;.*; 16bit.*\)/ && do {return "Windows 3.1";};
- /Mozilla.*\(.*;.*; 68K.*\)/ && do {return "Mac System 8.5";};
- /Mozilla.*\(.*;.*; PPC.*\)/ && do {return "Mac System 8.5";};
- /Mozilla.*\(.*;.*; OSF.*\)/ && do {return "OSF/1";};
- /Mozilla.*\(.*;.*; Linux.*\)/ && do {return "Linux";};
- /Mozilla.*\(.*;.*; SunOS 5.*\)/ && do {return "Solaris";};
- /Mozilla.*\(.*;.*; SunOS.*\)/ && do {return "SunOS";};
- /Mozilla.*\(.*;.*; SunOS.*\)/ && do {return "SunOS";};
- /Mozilla.*\(.*;.*; BSD\/OS.*\)/ && do {return "BSDI";};
- /Mozilla.*\(Win16.*\)/ && do {return "Windows 3.1";};
- /Mozilla.*\(Win95.*\)/ && do {return "Windows 95";};
- /Mozilla.*\(WinNT.*\)/ && do {return "Windows NT";};
- # default
- return "other";
+ if ( Param('usebrowserinfo') ) {
+ for ($ENV{'HTTP_USER_AGENT'}) {
+ /Mozilla.*\(.*;.*; IRIX.*\)/ && do {return "IRIX";};
+ /Mozilla.*\(.*;.*; 32bit.*\)/ && do {return "Windows 95";};
+ /Mozilla.*\(.*;.*; 16bit.*\)/ && do {return "Windows 3.1";};
+ /Mozilla.*\(.*;.*; 68K.*\)/ && do {return "Mac System 8.5";};
+ /Mozilla.*\(.*;.*; PPC.*\)/ && do {return "Mac System 8.5";};
+ /Mozilla.*\(.*;.*; OSF.*\)/ && do {return "OSF/1";};
+ /Mozilla.*\(.*;.*; Linux.*\)/ && do {return "Linux";};
+ /Mozilla.*\(.*;.*; SunOS 5.*\)/ && do {return "Solaris";};
+ /Mozilla.*\(.*;.*; SunOS.*\)/ && do {return "SunOS";};
+ /Mozilla.*\(.*;.*; SunOS.*\)/ && do {return "SunOS";};
+ /Mozilla.*\(.*;.*; BSD\/OS.*\)/ && do {return "BSDI";};
+ /Mozilla.*\(Win16.*\)/ && do {return "Windows 3.1";};
+ /Mozilla.*\(Win95.*\)/ && do {return "Windows 95";};
+ /Mozilla.*\(WinNT.*\)/ && do {return "Windows NT";};
+ }
}
+ # default
+ return "other";
}
@@ -226,10 +233,10 @@ print "
<tr>
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#assigned_to\">Assigned To:</A></B></TD>
<TD colspan=5>$assign_element
- (Leave blank to assign to default owner for component)</td>
+ (Leave blank to assign to default component owner)</td>
</tr>
<tr>
- <TD ALIGN=RIGHT ><B>Cc:</B></TD>
+ <TD ALIGN=RIGHT><B>Cc:</B></TD>
<TD colspan=5>$cc_element</TD>
</tr>
<tr><td>&nbsp<td> <td> <td> <td> <td> </tr>
@@ -247,9 +254,8 @@ print "
value_quote(formvalue('short_desc')) .
"\"></TD>
</TR>
- <tr><td>&nbsp<td> <td> <td> <td> <td> </tr>
+ <tr><td align=right valign=top><B>Description:</b></tr>
<tr>
- <td align=right valign=top><B>Description:</b>
<td colspan=5><TEXTAREA WRAP=HARD NAME=comment ROWS=10 COLS=80>" .
value_quote(formvalue('comment')) .
"</TEXTAREA><BR></td>
@@ -266,9 +272,11 @@ print "
</tr>
</TABLE>
<INPUT TYPE=hidden name=form_name VALUE=enter_bug>
-</FORM>
+</FORM>\n";
-Some fields initialized from your user-agent, <b>$ENV{'HTTP_USER_AGENT'}</b>.
-If you think it got it wrong, please tell " . Param('maintainer') . " what it should have been.
+if ( Param('usebrowserinfo') ) {
+ print "Some fields initialized from your user-agent, <b>$ENV{'HTTP_USER_AGENT'}</b>.
+ If you think it got it wrong, please tell " . Param('maintainer') . " what it should have been.";
+}
+print "</BODY></HTML>\n";
-</BODY></HTML>";