You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by bu...@apache.org on 2012/04/29 23:39:05 UTC
svn commit: r815046 - in /websites/staging/ooo-site/trunk: cgi-bin/ content/
content/download/test/download_new_dl.js
Author: buildbot
Date: Sun Apr 29 21:39:04 2012
New Revision: 815046
Log:
Staging update by buildbot for openofficeorg
Modified:
websites/staging/ooo-site/trunk/cgi-bin/ (props changed)
websites/staging/ooo-site/trunk/content/ (props changed)
websites/staging/ooo-site/trunk/content/download/test/download_new_dl.js
Propchange: websites/staging/ooo-site/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sun Apr 29 21:39:04 2012
@@ -1 +1 @@
-1331998
+1332003
Propchange: websites/staging/ooo-site/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sun Apr 29 21:39:04 2012
@@ -1 +1 @@
-1331998
+1332003
Modified: websites/staging/ooo-site/trunk/content/download/test/download_new_dl.js
==============================================================================
--- websites/staging/ooo-site/trunk/content/download/test/download_new_dl.js (original)
+++ websites/staging/ooo-site/trunk/content/download/test/download_new_dl.js Sun Apr 29 21:39:04 2012
@@ -376,6 +376,10 @@ function getLanguageISO() {
function hasMirrorLink() {
var a = getArray();
var platform = getPlatform();
+ var schema = SCHEMA;
+ if (schema == "aoo_inclubating") {
+ platform = getPlatform(schema);
+ }
if ( a[4] == 'y' ) {
// special handling for MAC, links in combination with general flag a[4]
@@ -507,6 +511,70 @@ function getPlatform() {
return "Windows";
}
+/* for customizing platforms for various schemas/release */
+function getPlatform(schema) {
+ if (schema == "aoo_incubating") {
+ if ( navigator.platform != null ) {
+ if ( navigator.platform.indexOf( "Win32" ) != -1 ) {
+ return "Windows";
+ } else if ( navigator.platform.indexOf( "Win64" ) != -1 ) {
+ return "Windows";
+ } else if ( navigator.platform.indexOf( "Win" ) != -1 ) {
+ return "Windows";
+ } else if ( navigator.platform.indexOf( "Linux" ) != -1 ) {
+ if ( navigator.platform.indexOf( "64" ) != -1 ) {
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 ||
+ navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ return "Linux Debian 64-bit";
+ } else {
+ return "Linux 64-bit";
+ }
+ } else {
+ return "Linux 64-bit";
+ }
+ } else {
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 ||
+ navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ return "Linux Debian";
+ } else {
+ return "Linux";
+ }
+ } else {
+ return "Linux";
+ }
+ }
+ } else if ( navigator.platform.indexOf( "SunOS i86pc" ) != -1 ) {
+ return "";
+ } else if ( navigator.platform.indexOf( "SunOS sun4u" ) != -1 ) {
+ return "";
+ } else if ( navigator.platform.indexOf( "SunOS" ) != -1 ) {
+ return "";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "Intel" ) != -1 ) {
+ return "Mac OS Intel";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "PPC" ) != -1 ) {
+ return "";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 ) {
+ return "Mac OS Intel" ;
+ } else if ( navigator.platform.indexOf( "iPad" ) != -1 || navigator.platform.indexOf( "iPhone" ) != -1 ||
+ navigator.platform.indexOf( "iPod" ) != -1 ) {
+ // this code will redirect the iPad, iPhone and iPod entries
+ return "Mac OS Intel" ;
+ } else if ( navigator.platform.indexOf( "Series60" ) != -1 ) {
+ // this code will redirect the Series60 entries
+ return "Windows" ;
+ } else if ( navigator.platform.indexOf( "null" ) != -1 ) {
+ return "Windows" ;
+ } else {
+ // return platform name
+ return navigator.platform;
+ }
+ } // null navigator platform
+ return "Windows";
+ }
+}
+
/*
* get platform for bouncer-link
* must be changed