]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 471522: OS sniffing doesn't properly detect OS X 10.5 (and others) - Patch by...
authorlpsolit%gmail.com <>
Sun, 5 Apr 2009 22:02:06 +0000 (22:02 +0000)
committerlpsolit%gmail.com <>
Sun, 5 Apr 2009 22:02:06 +0000 (22:02 +0000)
enter_bug.cgi

index f028187fd8075e21ab26217b2c5035f087242ccf..408336121df0977e4e33f7c7dff6d3bd3d818d59 100755 (executable)
@@ -303,8 +303,18 @@ sub pickos {
               /\(.*Windows.*NT.*\)/ && do {push @os, "Windows NT";};
             };
             /\(.*Mac OS X.*\)/ && do {
-              /\(.*Intel.*Mac OS X 10.5.*\)/ && do {push @os, "Mac OS X 10.5";};
+              /\(.*Mac OS X (?:|Mach-O |\()10.6.*\)/ && do {push @os, "Mac OS X 10.6";};
+              /\(.*Mac OS X (?:|Mach-O |\()10.5.*\)/ && do {push @os, "Mac OS X 10.5";};
+              /\(.*Mac OS X (?:|Mach-O |\()10.4.*\)/ && do {push @os, "Mac OS X 10.4";};
+              /\(.*Mac OS X (?:|Mach-O |\()10.3.*\)/ && do {push @os, "Mac OS X 10.3";};
+              /\(.*Mac OS X (?:|Mach-O |\()10.2.*\)/ && do {push @os, "Mac OS X 10.2";};
+              /\(.*Mac OS X (?:|Mach-O |\()10.1.*\)/ && do {push @os, "Mac OS X 10.1";};
+        # Unfortunately, OS X 10.4 was the first to support Intel. This is
+        # fallback support because some browsers refused to include the OS
+        # Version.
               /\(.*Intel.*Mac OS X.*\)/ && do {push @os, "Mac OS X 10.4";};
+        # OS X 10.3 is the most likely default version of PowerPC Macs
+        # OS X 10.0 is more for configurations which didn't setup 10.x versions
               /\(.*Mac OS X.*\)/ && do {push @os, ("Mac OS X 10.3", "Mac OS X 10.0", "Mac OS X");};
             };
             /\(.*32bit.*\)/ && do {push @os, "Windows 95";};