]> granicus.if.org Git - php/commitdiff
Fix #69781: phpinfo() reports Professional Editions of Windows 7/8/8.1/10 as "Business"
authorChristian Wenz <christian@wenz.org>
Tue, 9 Jun 2015 08:40:36 +0000 (10:40 +0200)
committerAnatol Belski <ab@php.net>
Wed, 10 Jun 2015 09:22:30 +0000 (11:22 +0200)
ext/standard/info.c

index 82b6bf8b48d40b9f3639d93979591412e6a8de7d..d170f8a34559e87bfb3e8103af3093d3b6f93040 100644 (file)
@@ -404,10 +404,25 @@ char* php_get_windows_name()
                                        sub = "Enterprise Edition";
                                        break;
                                case PRODUCT_BUSINESS:
-                                       sub = "Business Edition";
+                                       if ((osvi.dwMajorVersion > 6) || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion > 0)) {
+                                               sub = "Professional Edition";
+                                       } else {
+                                               sub = "Business Edition";
+                                       }
+                                       break;
+                               case PRODUCT_BUSINESS_N:
+                                       if ((osvi.dwMajorVersion > 6) || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion > 0)) {
+                                               sub = "Professional N Edition";
+                                       } else {
+                                               sub = "Business N Edition";
+                                       }
                                        break;
                                case PRODUCT_STARTER:
-                                       sub = "Starter Edition";
+                                       if ((osvi.dwMajorVersion > 6) || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion > 0)) {
+                                               sub = "Starter N Edition";
+                                       } else {
+                                           sub = "Starter Edition";
+                                       }
                                        break;
                                case PRODUCT_CLUSTER_SERVER:
                                        sub = "Cluster Server Edition";