Author: marcus
Date: Tue Mar 11 10:34:23 2014
New Revision: 1576266
URL: http://svn.apache.org/r1576266
Log:
Fixed problem to recognize OS X 10.6 or older platform correctly
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=1576266&r1=1576265&r2=1576266&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/download.js (original)
+++ openoffice/ooo-site/trunk/content/download/download.js Tue Mar 11 10:34:23
2014
@@ -125,7 +125,7 @@ function getLink( rel_mode ) {
var chk_link = "";
getLanguage();
- getPlatform();
+ getPlatform( rel_mode );
if ( hasMirrorLink() ) {
getFilesize( rel_mode );
}
@@ -146,6 +146,7 @@ function getLink( rel_mode ) {
// If platform is too old, then provide a general
download link to the archive.
if ( OLD_PLATFORM ) {
// If platform is Mac OS X <=10.6, then provide
a download link with previous AOO version.
+/*
if ( UI_PLATFORM == "Mac OS X (10.6 or older)"
) {
FILENAME = "Apache_OpenOffice_"
+ PRE_VERSION + "_" + URL_PLATFORM + "_";
@@ -167,6 +168,7 @@ function getLink( rel_mode ) {
ERROR = true;
return LINK;
}
+*/
// If platform is Solaris, FreeBSD or OS/2,
// then provide a download link to the porting
webpage.
if ( UI_PLATFORM == "Solaris x86 (PKG)" ||
@@ -246,7 +248,6 @@ function getLink( rel_mode ) {
return LINK;
} else {
// Beta release mode
-
// If platform is too old, then provide a general
download link to the archive.
if ( OLD_PLATFORM ) {
// If platform is Mac OS X <=10.6, then provide
a download link with previous AOO version.
@@ -320,12 +321,15 @@ function getLink( rel_mode ) {
* Get platform of browser
* Depends on internal browser data
*/
-function getPlatform() {
+function getPlatform( rel_mode ) {
// For more help or data see: "http://www.useragentstring.com"
- var os = navigator.platform.toLowerCase();
- var ua = navigator.userAgent.toLowerCase();
- var av = navigator.appVersion.toLowerCase();
+ var os = navigator.platform.toLowerCase(); // Get the
platform string in lower cases
+ var ua = navigator.userAgent.toLowerCase(); // Get the User
Agent string in lower cases
+ var av = navigator.appVersion.toLowerCase(); // Get the
application version in lower cases
+ UI_PLATFORM = ""; // Delete any
previously set string
+ URL_PLATFORM = ""; // Delete any
previously set string
+ EXTENSION = ""; // Delete any
previously set string
// Add ECMA262-5 Array methods if not supported natively
// To workaround that MSIE 8 and older do not support this function
@@ -463,7 +467,8 @@ function getPlatform() {
ua.indexOf( "10_4" ) != -1 ||
ua.indexOf( "10.3" ) != -1 ||
ua.indexOf( "10_3" ) != -1 ) { UI_PLATFORM
= "Mac OS X (10.6 or older)";
- OLD_PLATFORM
= true;
+ if ( rel_mode >
0 )
+
OLD_PLATFORM = true;
}
}
}
@@ -473,6 +478,7 @@ function getPlatform() {
UI_PLATFORM = "unknown platform/OS";
ERROR = true;
}
+
return;
}