Author: marcus Date: Mon Jul 6 11:36:31 2015 New Revision: 1689373 URL: http://svn.apache.org/r1689373 Log: Fixed problem with recognizing newer Mac OS X versions - Part 2
Modified: openoffice/ooo-site/trunk/content/download/download.js Modified: openoffice/ooo-site/trunk/content/download/download.js URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/download.js?rev=1689373&r1=1689372&r2=1689373&view=diff ============================================================================== --- openoffice/ooo-site/trunk/content/download/download.js (original) +++ openoffice/ooo-site/trunk/content/download/download.js Mon Jul 6 11:36:31 2015 @@ -933,7 +933,7 @@ DL.getPlatform = function() { // For more help or data see: "http://www.useragentstring.com". var av, os, ua, ve = ""; - + if( navigator.appVersion ) { av = navigator.appVersion.toLowerCase(); // Get the application version in lower case. } @@ -1104,29 +1104,30 @@ DL.getPlatform = function() { if( os.indexOf( "mac" ) !== -1 ) { DL.UI_PLATFORM = "OS X 64-bit (x86-64) (DMG)"; DL.PLATFORM = "mac64"; DL.EXTENSION = ".dmg"; + // OS X: 10.6 or older? - if( ua.indexOf( "10.6" ) !== -1 || - ua.indexOf( "10_6" ) !== -1 || - ua.indexOf( "10.5" ) !== -1 || - ua.indexOf( "10_5" ) !== -1 || - ua.indexOf( "10.4" ) !== -1 || - ua.indexOf( "10_4" ) !== -1 || - ua.indexOf( "10.3" ) !== -1 || - ua.indexOf( "10_3" ) !== -1 ) { DL.UI_PLATFORM = "Mac OS X (Version <= 10.6)"; + if( ua.indexOf( " 10.6" ) !== -1 || + ua.indexOf( " 10_6" ) !== -1 || + ua.indexOf( " 10.5" ) !== -1 || + ua.indexOf( " 10_5" ) !== -1 || + ua.indexOf( " 10.4" ) !== -1 || + ua.indexOf( " 10_4" ) !== -1 || + ua.indexOf( " 10.3" ) !== -1 || + ua.indexOf( " 10_3" ) !== -1 ) { DL.UI_PLATFORM = "Mac OS X (Version <= 10.6)"; DL.PLATFORM = "mac32"; } // OS X: 10.7 or newer? - if( ua.indexOf( "10.11_" ) !== -1 || - ua.indexOf( "10_11_" ) !== -1 || - ua.indexOf( "10.10_" ) !== -1 || - ua.indexOf( "10_10_" ) !== -1 || - ua.indexOf( "10.9_" ) !== -1 || - ua.indexOf( "10_9_" ) !== -1 || - ua.indexOf( "10.8_" ) !== -1 || - ua.indexOf( "10_8_" ) !== -1 || - ua.indexOf( "10.7_" ) !== -1 || - ua.indexOf( "10_7_" ) !== -1 ) { DL.UI_PLATFORM = "OS X 64-bit (x86-64) (DMG)"; + if( ua.indexOf( " 10.11" ) !== -1 || + ua.indexOf( " 10_11" ) !== -1 || + ua.indexOf( " 10.10" ) !== -1 || + ua.indexOf( " 10_10" ) !== -1 || + ua.indexOf( " 10.9" ) !== -1 || + ua.indexOf( " 10_9" ) !== -1 || + ua.indexOf( " 10.8" ) !== -1 || + ua.indexOf( " 10_8" ) !== -1 || + ua.indexOf( " 10.7" ) !== -1 || + ua.indexOf( " 10_7" ) !== -1 ) { DL.UI_PLATFORM = "OS X 64-bit (x86-64) (DMG)"; DL.PLATFORM = "mac64"; } }