Commit e9380b72 authored by timeless%mozdev.org's avatar timeless%mozdev.org

Bug 35154 enter_bug.cgi expects UA format some browsers don't deliver (IE)

Handle Windows 95/98/Me, Windows-NT, Alpha (AXP), BSD/386, (HP) 9000 Special case winmosaic r=vlad a=justdave
parent 8b7c5ce7
...@@ -124,34 +124,37 @@ sub pickplatform { ...@@ -124,34 +124,37 @@ sub pickplatform {
#Intel x86 #Intel x86
/\(.*[ix0-9]86.*\)/ && do {return "PC";}; /\(.*[ix0-9]86.*\)/ && do {return "PC";};
#Versions of Windows that only run on Intel x86 #Versions of Windows that only run on Intel x86
/\(.*Windows 9.*\)/ && do {return "PC";}; /\(.*Win(?:dows )[39M].*\)/ && do {return "PC";};
/\(.*Win9.*\)/ && do {return "PC";}; /\(.*Win(?:dows )16.*\)/ && do {return "PC";};
/\(.*Windows 3.*\)/ && do {return "PC";};
/\(.*Win16.*\)/ && do {return "PC";};
#Sparc #Sparc
/\(.*sparc.*\)/ && do {return "Sun";}; /\(.*sparc.*\)/ && do {return "Sun";};
/\(.*sun4.*\)/ && do {return "Sun";}; /\(.*sun4.*\)/ && do {return "Sun";};
#Alpha #Alpha
/\(.*Alpha.*\)/i && do {return "DEC";}; /\(.*AXP.*\)/i && do {return "DEC";};
/\(.*[ _]Alpha.\D/i && do {return "DEC";};
/\(.*[ _]Alpha\)/i && do {return "DEC";};
#MIPS #MIPS
/\(.*IRIX.*\)/i && do {return "SGI";}; /\(.*IRIX.*\)/i && do {return "SGI";};
/\(.*MIPS.*\)/i && do {return "SGI";}; /\(.*MIPS.*\)/i && do {return "SGI";};
#68k #68k
/\(.*68K.*\)/ && do {return "Macintosh";}; /\(.*68K.*\)/ && do {return "Macintosh";};
/\(.*680[x0]0.*\)/ && do {return "Macintosh";}; /\(.*680[x0]0.*\)/ && do {return "Macintosh";};
#HP
/\(.*9000.*\)/ && do {return "HP";};
#ARM #ARM
# /\(.*ARM.*\) && do {return "ARM";}; # /\(.*ARM.*\) && do {return "ARM";};
#Stereotypical and broken #Stereotypical and broken
/\(.*Macintosh.*\)/ && do {return "Macintosh";}; /\(.*Macintosh.*\)/ && do {return "Macintosh";};
/\(.*Mac OS [89].*\)/ && do {return "Macintosh";}; /\(.*Mac OS [89].*\)/ && do {return "Macintosh";};
/\(Win.*\)/ && do {return "PC";}; /\(Win.*\)/ && do {return "PC";};
/\(.*Windows NT.*\)/ && do {return "PC";}; /\(.*Win(?:dows[ -])NT.*\)/ && do {return "PC";};
/\(.*OSF.*\)/ && do {return "DEC";}; /\(.*OSF.*\)/ && do {return "DEC";};
/\(.*HP-?UX.*\)/i && do {return "HP";}; /\(.*HP-?UX.*\)/i && do {return "HP";};
/\(.*IRIX.*\)/i && do {return "SGI";}; /\(.*IRIX.*\)/i && do {return "SGI";};
/\(.*(SunOS|Solaris).*\)/ && do {return "Sun";}; /\(.*(SunOS|Solaris).*\)/ && do {return "Sun";};
#Braindead old browsers who didn't follow convention: #Braindead old browsers who didn't follow convention:
/Amiga/ && do {return "Macintosh";}; /Amiga/ && do {return "Macintosh";};
/WinMosaic/ && do {return "PC";};
} }
} }
# default # default
...@@ -170,7 +173,7 @@ sub pickos { ...@@ -170,7 +173,7 @@ sub pickos {
/\(.*SunOS 5.*\)/ && do {return "Solaris";}; /\(.*SunOS 5.*\)/ && do {return "Solaris";};
/\(.*SunOS.*\)/ && do {return "SunOS";}; /\(.*SunOS.*\)/ && do {return "SunOS";};
/\(.*HP-?UX.*\)/ && do {return "HP-UX";}; /\(.*HP-?UX.*\)/ && do {return "HP-UX";};
/\(.*BSD\/OS.*\)/ && do {return "BSDI";}; /\(.*BSD\/(?:OS|386).*\)/ && do {return "BSDI";};
/\(.*FreeBSD.*\)/ && do {return "FreeBSD";}; /\(.*FreeBSD.*\)/ && do {return "FreeBSD";};
/\(.*OpenBSD.*\)/ && do {return "OpenBSD";}; /\(.*OpenBSD.*\)/ && do {return "OpenBSD";};
/\(.*NetBSD.*\)/ && do {return "NetBSD";}; /\(.*NetBSD.*\)/ && do {return "NetBSD";};
...@@ -184,12 +187,13 @@ sub pickos { ...@@ -184,12 +187,13 @@ sub pickos {
/\(.*Windows NT 5\.1.*\)/ && do {return "Windows XP";}; /\(.*Windows NT 5\.1.*\)/ && do {return "Windows XP";};
/\(.*Windows 2000.*\)/ && do {return "Windows 2000";}; /\(.*Windows 2000.*\)/ && do {return "Windows 2000";};
/\(.*Windows NT 5.*\)/ && do {return "Windows 2000";}; /\(.*Windows NT 5.*\)/ && do {return "Windows 2000";};
/\(.*Windows.*NT.*\)/ && do {return "Windows NT";};
/\(.*Win.*9[8x].*4\.9.*\)/ && do {return "Windows ME";}; /\(.*Win.*9[8x].*4\.9.*\)/ && do {return "Windows ME";};
/\(.*Win98.*\)/ && do {return "Windows 98";}; /\(.*Win(?:dows )M[Ee].*\)/ && do {return "Windows ME";};
/\(.*Win95.*\)/ && do {return "Windows 95";}; /\(.*Win(?:dows )98.*\)/ && do {return "Windows 98";};
/\(.*Win16.*\)/ && do {return "Windows 3.1";}; /\(.*Win(?:dows )95.*\)/ && do {return "Windows 95";};
/\(.*WinNT.*\)/ && do {return "Windows NT";}; /\(.*Win(?:dows )16.*\)/ && do {return "Windows 3.1";};
/\(.*Win(?:dows[ -])NT.*\)/ && do {return "Windows NT";};
/\(.*Windows.*NT.*\)/ && do {return "Windows NT";};
/\(.*32bit.*\)/ && do {return "Windows 95";}; /\(.*32bit.*\)/ && do {return "Windows 95";};
/\(.*16bit.*\)/ && do {return "Windows 3.1";}; /\(.*16bit.*\)/ && do {return "Windows 3.1";};
/\(.*Mac OS 9.*\)/ && do {return "Mac System 9.x";}; /\(.*Mac OS 9.*\)/ && do {return "Mac System 9.x";};
...@@ -208,6 +212,7 @@ sub pickos { ...@@ -208,6 +212,7 @@ sub pickos {
/\(.*Mac.*68k.*\)/ && do {return "Mac System 8.0";}; /\(.*Mac.*68k.*\)/ && do {return "Mac System 8.0";};
# Evil # Evil
/Amiga/i && do {return "other";}; /Amiga/i && do {return "other";};
/WinMosaic/ && do {return "Windows 95";};
/\(.*PowerPC.*\)/ && do {return "Mac System 9.x";}; /\(.*PowerPC.*\)/ && do {return "Mac System 9.x";};
/\(.*PPC.*\)/ && do {return "Mac System 9.x";}; /\(.*PPC.*\)/ && do {return "Mac System 9.x";};
/\(.*68K.*\)/ && do {return "Mac System 8.0";}; /\(.*68K.*\)/ && do {return "Mac System 8.0";};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment