From 26640251cc8ace3a5fea3b6af121533150d8eed8 Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" <> Date: Sat, 28 Aug 2004 15:58:13 +0000 Subject: Patch for bug 248613: Custom global default platform/OS in non-usebrowserinfo scenarios; patch by Marc Schumann ; r=kiko, a=myk. --- enter_bug.cgi | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'enter_bug.cgi') diff --git a/enter_bug.cgi b/enter_bug.cgi index a0291fae5..a9f1f4958 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -155,7 +155,9 @@ sub formvalue { sub pickplatform { return formvalue("rep_platform") if formvalue("rep_platform"); - if ( Param('usebrowserinfo') ) { + if (Param('defaultplatform')) { + return Param('defaultplatform'); + } else { for ($ENV{'HTTP_USER_AGENT'}) { #PowerPC /\(.*PowerPC.*\)/i && do {return "Macintosh";}; @@ -196,16 +198,17 @@ sub pickplatform { /Amiga/ && do {return "Macintosh";}; /WinMosaic/ && do {return "PC";}; } + return "Other"; } - # default - return "Other"; } sub pickos { if (formvalue('op_sys') ne "") { return formvalue('op_sys'); } - if ( Param('usebrowserinfo') ) { + if (Param('defaultopsys')) { + return Param('defaultopsys'); + } else { for ($ENV{'HTTP_USER_AGENT'}) { /\(.*IRIX.*\)/ && do {return "IRIX";}; /\(.*OSF.*\)/ && do {return "OSF/1";}; @@ -259,9 +262,8 @@ sub pickos { /\(.*PPC.*\)/ && do {return "Mac System 9.x";}; /\(.*68K.*\)/ && do {return "Mac System 8.0";}; } + return "other"; } - # default - return "other"; } ############################################################################## # End of subroutines -- cgit v1.2.3-24-g4f1b