Author: buildbot
Date: Thu May  1 22:00:35 2014
New Revision: 907718

Log:
Staging update by buildbot for ooo-site

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.js

Propchange: websites/staging/ooo-site/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu May  1 22:00:35 2014
@@ -1 +1 @@
-1591790
+1591791

Propchange: websites/staging/ooo-site/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu May  1 22:00:35 2014
@@ -1 +1 @@
-1591790
+1591791

Modified: websites/staging/ooo-site/trunk/content/download/test/download.js
==============================================================================
--- websites/staging/ooo-site/trunk/content/download/test/download.js (original)
+++ websites/staging/ooo-site/trunk/content/download/test/download.js Thu May  
1 22:00:35 2014
@@ -5,6 +5,7 @@
  * function hasMirrorLink ()
  * function getLink       ( rel_mode )
  * function getPlatform   ()
+ * function getFilename   ( ver )
  * function getFilesize   ()
  * function openItem      ( itemid, uri )
  */
@@ -16,6 +17,7 @@ var LANG_ISO                  = "";    // The language as
 var LANG_ARRAY                 = "";    // This array contains all language 
specific data
 var RELEASE_MATRIX_PLATFORM_POS        = -1;    // The position of the 
platform in the release matrix array
 var RELEASE_MATRIX_PLATFORM    = "";    // The platform in the release matrix 
array
+var RELEASE_MATRIX_LANG                = "";    // This array contains all 
language specific data for the language specific data
 var UI_PLATFORM                        = "";    // The platform as readable 
string
 var URL_PLATFORM               = "";    // The platform as part of the 
download URL
 var OLD_PLATFORM               = false; // The browser platform is old (true) 
or not (false)
@@ -41,19 +43,20 @@ function alertDbg( function_name ) {
        + "LANG_ISO: "                          + "\t\t\t\t\t"          + 
LANG_ISO                              + "\n"
        + "LANG_ARRAY: "                        + "\t\t\t\t\t"          + 
LANG_ARRAY                            + "\n"
        + "RELEASE_MATRIX_PLATFORM_POS: "       + "\t"                  + 
RELEASE_MATRIX_PLATFORM_POS           + "\n"
-       + "RELEASE_MATRIX_PLATFORM: "           + "\t\t\t"              + 
RELEASE_MATRIX_PLATFORM               + "\n"
+       + "RELEASE_MATRIX_PLATFORM: "           + "\t\t"                + 
RELEASE_MATRIX_PLATFORM               + "\n"
+       + "RELEASE_MATRIX_LANG: "               + "\t\t\t"              + 
RELEASE_MATRIX_LANG                   + "\n"
        + "UI_PLATFORM: "                       + "\t\t\t\t\t"          + 
UI_PLATFORM                           + "\n"
        + "URL_PLATFORM: "                      + "\t\t\t\t\t"          + 
URL_PLATFORM                          + "\n"
-       + "OLD_PLATFORM: "                      + "\t\t\t\t\t"          + 
OLD_PLATFORM                          + "\n"
-       + "FILENAME: "                          + "\t\t\t\t"            + 
FILENAME                              + "\n"
-       + "FILESIZE: "                          + "\t\t\t\t\t"          + 
FILESIZE                              + "\n"
+       + "OLD_PLATFORM: "                      + "\t\t\t\t"            + 
OLD_PLATFORM                          + "\n"
+       + "FILENAME: "                          + "\t\t\t\t\t\t"        + 
FILENAME                              + "\n"
+       + "FILESIZE: "                          + "\t\t\t\t\t\t"        + 
FILESIZE                              + "\n"
        + "EXTENSION: "                         + "\t\t\t\t\t"          + 
EXTENSION                             + "\n"
        + "BASE_URL: "                          + "\t\t\t\t\t"          + 
SOURCEFORGE_BASE_URL                  + "\n"
        + "LINK: "                              + "\t\t\t\t\t\t"        + LINK  
                                + "\n"
-       + "CHECKSUM_ASC: "                      + "\t\t\t\t\t"          + 
CHECKSUM_ASC                          + "\n"
-       + "CHECKSUM_MD5: "                      + "\t\t\t\t\t"          + 
CHECKSUM_MD5                          + "\n"
-       + "CHECKSUM_SHA256: "                   + "\t\t\t\t\t"          + 
CHECKSUM_SHA256                       + "\n"
-       + "SOURCEFORGE: "                       + "\t\t\t\t\t\t"        + 
SOURCEFORGE                           + "\n"
+       + "CHECKSUM_ASC: "                      + "\t\t\t\t"            + 
CHECKSUM_ASC                          + "\n"
+       + "CHECKSUM_MD5: "                      + "\t\t\t\t"            + 
CHECKSUM_MD5                          + "\n"
+       + "CHECKSUM_SHA256: "                   + "\t\t\t\t"            + 
CHECKSUM_SHA256                       + "\n"
+       + "SOURCEFORGE: "                       + "\t\t\t\t\t"          + 
SOURCEFORGE                           + "\n"
        + "OTHER: "                             + "\t\t\t\t\t\t"        + OTHER 
                                + "\n"
        + "ARCHIVE: "                           + "\t\t\t\t\t\t"        + 
ARCHIVE                               + "\n"
        + "ERROR: "                             + "\t\t\t\t\t\t"        + ERROR 
                                + "\n"
@@ -78,13 +81,13 @@ function getLanguage() {
        else if ( navigator.systemLanguage )
                language = navigator.systemLanguage;
 
-       // Convert "en" to "en-US" as well as setting it as fall-back language
+       // Convert "en" to "en-US" as well as setting it as fall-back language.
        if ( !language || language == "" || language == "null" || language == 
"en" )
                language = "en-US";
        if ( language == "pt" )
                language = "pt-PT";
 
-       // Konqueror uses '_' where other browsers use '-'
+       // Konqueror uses '_' where other browsers use '-'.
        if ( language.indexOf( "_" ) != -1 )
                language = language.split( "_" ).join( "-" );
 
@@ -94,7 +97,7 @@ function getLanguage() {
        var thisLanguageSet     = languages[ languageCode ];
 
        if ( thisLanguageSet == null ) {
-               // Language code not found inside array
+               // Language code not found inside array.
                language        = "en-US";
                languageCode    = "en";
                regionCode      = "us";
@@ -102,20 +105,20 @@ function getLanguage() {
        }
 
        if ( regionCode != null ) {
-               // Fix for Portuguese pt-PT downloads named only pt without 
region code!
+               // Fix for Portuguese pt-PT downloads named only pt without 
region code!.
                if ( regionCode == "pt" && languageCode == "pt" )
                        language = languageCode;
 
-               // If an additional region code was found
+               // If an additional region code was found.
                if ( thisLanguageSet[ regionCode ] != null ) {
-                       // Then choose langCode-regionCode
+                       // Choose langCode-regionCode
                        language     = languageCode + "-" + 
regionCode.toUpperCase();
                        thisLanguage = thisLanguageSet[ regionCode ];
                } else {
-                       // Choose the default langCode
+                       // Choose the default langCode.
                        thisLanguage = thisLanguageSet[ "-" ];
                        if ( languageCode == "en" ) {
-                               // Special case, default is en-US for en-XX
+                               // Special case, default is en-US for en-XX.
                                language        = "en-US";
                                regionCode      = "us";
                                thisLanguageSet = languages[ languageCode ];
@@ -125,23 +128,29 @@ function getLanguage() {
                        }
                }
        } else {
-               // Choose the default for none given region code
+               // Choose the default for none given region code.
                thisLanguage = thisLanguageSet[ "-" ];
        }
 
        LANG_ISO   = language;
        LANG_ARRAY = thisLanguage;
 
+       var thisReleaseMatrixSet = release_matrix_410[ LANG_ISO ];
+       RELEASE_MATRIX_LANG      = thisReleaseMatrixSet[ 0 ];
+
        return LANG_ISO;
 }
 
 /*
  * Get flag for mirror link
- * Depends on array-list
+ * Depends on array-list and "languages.js"
+ * Depends on array-list and "release_matrix.js"
  */
 function hasMirrorLink() {
-       // Check the flag in "languages.js", 'y' -> provide download link, 'n' 
-> redirect to alternative webpage
-       if ( LANG_ARRAY[ 3 ] == 'y' ) {
+       // Check the flag in "languages.js", 'y' -> provide download link, 'n' 
-> redirect to alternative webpage.
+       // Check the flag in "release_matrix.js", 'y' -> provide download link, 
'n' -> redirect to alternative webpage.
+//     if ( LANG_ARRAY[ 3 ] == 'y' ) {
+       if ( RELEASE_MATRIX_LANG[ 1 ] == 'y' ) {
                return true;
        } else {
                ERROR = true;
@@ -154,9 +163,7 @@ function hasMirrorLink() {
  * Depends on array-list
  */
 function getLink( rel_mode ) {
-       var chk_link = "";
-
-       // If no release mode was given, assume it's about the stable release
+       // If no release mode was given, assume it's about the stable release.
        if ( rel_mode == undefined )
                rel_mode = 1;
 
@@ -166,182 +173,104 @@ function getLink( rel_mode ) {
                getFilesize();
        }
 
-       // If language is supported, then provide a download link.
+       // If language is supported, provide a download link.
        if ( hasMirrorLink() ) {
-               // Release mode
-               if ( rel_mode == 1 ) {
-                       // 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 + "_";
-                                       FILENAME        = FILENAME + LANG_ISO + 
EXTENSION;
-                                       LINK            = 
SOURCEFORGE_PREVIOUS_URL + LANG_ISO + "/" + FILENAME + "/download";
-
-                                       chk_link        = 
APACHE_DIST_PREVIOUS_URL + "/binaries/" + LANG_ISO + "/";
-                                       chk_link        = chk_link + FILENAME;
-
-                                       CHECKSUM_KEYS   = 
"https://people.apache.org/keys/group/openoffice.asc";;
-                                       CHECKSUM_ASC    = chk_link + ".asc";
-                                       CHECKSUM_MD5    = chk_link + ".md5";
-                                       CHECKSUM_SHA256 = chk_link + ".sha256";
-
-                                       SOURCEFORGE     = false;
-                                       OTHER           = false;
-                                       ARCHIVE         = true;
-                                       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)"   ||
-                                    UI_PLATFORM == "Solaris SPARC (PKG)" ||
-                                    UI_PLATFORM == "FreeBSD (PKG)"       ||
-                                    UI_PLATFORM == "OS/2" ) {
-
-                                       LINK            = 
"http://www.openoffice.org/porting/index.html";;
-
-                                       SOURCEFORGE     = false;
-                                       OTHER           = true;
-                                       ARCHIVE         = false;
-                                       ERROR           = true;
-//                                     return LINK;
-                               }
-                               LINK            = 
"http://archive.apache.org/dist/openoffice/";;
+               // If platform is too old, provide a general download link to 
the archive.
+               if ( OLD_PLATFORM ) {
+                       // If platform is Mac OS X <=10.6, provide a download 
link with previous AOO version.
+                       if ( UI_PLATFORM == "Mac OS X (10.6 or older)" ) {
+                               LINK            = SOURCEFORGE_PREVIOUS_URL + 
LANG_ISO + "/" + getFilename( PRE_VERSION ) + "/download";
 
                                CHECKSUM_KEYS   = 
"https://people.apache.org/keys/group/openoffice.asc";;
-                               CHECKSUM_ASC    = 
"http://archive.apache.org/dist/openoffice/";;
-                               CHECKSUM_MD5    = 
"http://archive.apache.org/dist/openoffice/";;
-                               CHECKSUM_SHA256 = 
"http://archive.apache.org/dist/openoffice/";;
+                               CHECKSUM_ASC    = APACHE_DIST_PREVIOUS_URL + 
"/binaries/" + LANG_ISO + "/" + getFilename( PRE_VERSION ) + ".asc";
+                               CHECKSUM_MD5    = APACHE_DIST_PREVIOUS_URL + 
"/binaries/" + LANG_ISO + "/" + getFilename( PRE_VERSION ) + ".md5";
+                               CHECKSUM_SHA256 = APACHE_DIST_PREVIOUS_URL + 
"/binaries/" + LANG_ISO + "/" + getFilename( PRE_VERSION ) + ".sha256";
 
                                SOURCEFORGE     = false;
-                               OTHER           = true;
-                               ARCHIVE         = false;
+                               OTHER           = false;
+                               ARCHIVE         = true;
                                ERROR           = true;
-//                             return LINK;
-                       }
-                       // If no platform was recognized, then provide a 
general download link to the "other.html" webpage.
-                       if ( URL_PLATFORM == "" ) {
-                               // If no UI string was set, then show it to the 
user.
-                               if ( UI_PLATFORM == "" ) {
-                                       UI_PLATFORM = "unknown platform/OS";
-                               }
-                               LINK            = 
"http://www.openoffice.org/download/other.html";;
+                               return LINK;
+
+                       // If platform is Solaris, FreeBSD or OS/2, provide a 
download link to the porting webpage.
+                       } else if ( UI_PLATFORM == "Solaris x86 (PKG)"   ||
+                               UI_PLATFORM == "Solaris SPARC (PKG)" ||
+                               UI_PLATFORM == "FreeBSD (PKG)"       ||
+                               UI_PLATFORM == "OS/2" ) {
+
+                               LINK            = 
"http://www.openoffice.org/porting/index.html";;
 
                                SOURCEFORGE     = false;
                                OTHER           = true;
                                ARCHIVE         = false;
                                ERROR           = true;
-//                             return LINK;
-                       }
-
-                       // If platform was recognized, assemble the filenames 
for download and checksums
-                       FILENAME        = "Apache_OpenOffice_" + VERSION + "_" 
+ URL_PLATFORM + "_" + LANG_ISO  + EXTENSION;
 
-                       // Assign the file name (column 3) from the release 
matrix of language and platform
-                       // FILENAME     = release_matrix_410[ LANG_ISO ][ 
RELEASE_MATRIX_PLATFORM_POS ][ 3 ];
+                               return LINK;
 
-                       // LINK = SOURCEFORGE_BASE_URL + LANG_ISO + 
"/Apache_OpenOffice_" + VERSION + "_" + URL_PLATFORM;
-                       // LINK = LINK + "_" + LANG_ISO + EXTENSION + 
"/download";
-                       LINK            = SOURCEFORGE_BASE_URL + LANG_ISO + "/" 
+ FILENAME + "/download";
-
-                       // chk_link     = APACHE_DIST_BASE_URL + "/binaries/" + 
LANG_ISO + "/Apache_OpenOffice_" + VERSION;
-                       // chk_link     = chk_link + "_" + URL_PLATFORM + "_" + 
LANG_ISO + EXTENSION;
-                       chk_link        = APACHE_DIST_BASE_URL + "/binaries/" + 
LANG_ISO + "/" + FILENAME;
-
-                       CHECKSUM_KEYS   = 
"https://people.apache.org/keys/group/openoffice.asc";;
-                       CHECKSUM_ASC    = chk_link + ".asc";
-                       CHECKSUM_MD5    = chk_link + ".md5";
-                       CHECKSUM_SHA256 = chk_link + ".sha256";
-
-                       /*
-                       // Used for debugging
-                       LINK            = PEOPLE_BASE_URL + "/binaries/" + 
LANG_ISO + "/Apache_OpenOffice_";
-                       LINK            = LINK + "/Apache_OpenOffice_" + "_" + 
LANG_ISO + EXTENSION;
-                       chk_link        = PEOPLE_BASE_URL + "/binaries/" + 
LANG_ISO + "/Apache_OpenOffice_" + VERSION;
-                       chk_link        = chk_link + "_" + URL_PLATFORM + "_" + 
LANG_ISO + EXTENSION;
-                       */
+                       // All other cases for old platforms.
+                       } else {
+                               LINK            = 
"http://archive.apache.org/dist/openoffice/";;
 
-                       SOURCEFORGE     = true;
-                       OTHER           = false;
-                       ARCHIVE         = false;
-                       ERROR           = false;
-//                     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.
-                               if ( UI_PLATFORM == "Mac OS X (10.6 or older)" 
) {
-
-                                       FILENAME        = "Apache_OpenOffice_" 
+ PRE_VERSION + "_" + URL_PLATFORM + "_";
-                                       FILENAME        = FILENAME + LANG_ISO + 
EXTENSION;
-                                       LINK            = 
SOURCEFORGE_PREVIOUS_URL + LANG_ISO + "/" + FILENAME + "/download";
-
-                                       chk_link        = 
APACHE_DIST_PREVIOUS_URL + "/binaries/" + LANG_ISO + "/";
-                                       chk_link        = chk_link + FILENAME;
-
-                                       CHECKSUM_KEYS   = 
"https://people.apache.org/keys/group/openoffice.asc";;
-                                       CHECKSUM_ASC    = chk_link + ".asc";
-                                       CHECKSUM_MD5    = chk_link + ".md5";
-                                       CHECKSUM_SHA256 = chk_link + ".sha256";
-
-                                       SOURCEFORGE     = false;
-                                       OTHER           = false;
-                                       ARCHIVE         = true;
-                                       ERROR           = true;
-//                                     return LINK;
-                               }
-                               LINK    = 
"http://www.openoffice.org/download/all_beta.html";;
+                               CHECKSUM_KEYS   = 
"https://people.apache.org/keys/group/openoffice.asc";;
+                               CHECKSUM_ASC    = 
"http://archive.apache.org/dist/openoffice/";;
+                               CHECKSUM_MD5    = 
"http://archive.apache.org/dist/openoffice/";;
+                               CHECKSUM_SHA256 = 
"http://archive.apache.org/dist/openoffice/";;
 
                                SOURCEFORGE     = false;
                                OTHER           = true;
                                ARCHIVE         = false;
                                ERROR           = true;
-//                             return LINK;
+                               return LINK;
+                       }
+
+               // If language is supported but no platform was recognized, 
provide a general download link
+               // to the "other.html" webpage.
+               } else if ( URL_PLATFORM == "" ) {
+                       // If no UI string was set, show it to the user.
+                       if ( UI_PLATFORM == "" ) {
+                               UI_PLATFORM = "unknown platform/OS";
                        }
+                       LINK            = 
"http://www.openoffice.org/download/other.html";;
 
-                       // If platform was recognized, assemble the filenames 
for download and checksums
-                       FILENAME        = "Apache_OpenOffice_" + VERSION + "_" 
+ URL_PLATFORM + "_" + LANG_ISO + EXTENSION;
+                       SOURCEFORGE     = false;
+                       OTHER           = true;
+                       ARCHIVE         = false;
+                       ERROR           = true;
 
-                       // Assign the file name (column 3) from the release 
matrix of language and platform
-                       // FILENAME     = release_matrix_410_beta[ LANG_ISO ][ 
RELEASE_MATRIX_PLATFORM_POS ][ 3 ];
+                       return LINK;
 
-                       // LINK = BETA_SOURCEFORGE_BASE_URL + LANG_ISO + 
"/Apache_OpenOffice_Beta_" + VERSION + "_";
-                       // LINK = LINK + URL_PLATFORM + "_" + LANG_ISO + 
EXTENSION + "/download";
-                       LINK            = BETA_SOURCEFORGE_BASE_URL + LANG_ISO 
+ "/" + FILENAME + "/download";
-
-                       // chk_link     = BETA_APACHE_DIST_BASE_URL + 
"/binaries/" + LANG_ISO;
-                       // chk_link     = chk_link + "/Apache_OpenOffice_Beta_" 
+ VERSION + "_" + URL_PLATFORM + "_";
-                       // chk_link     = chk_link + LANG_ISO + EXTENSION;
-                       chk_link        = BETA_APACHE_DIST_BASE_URL + 
"/binaries/" + LANG_ISO + "/" + FILENAME;
-
-                       CHECKSUM_KEYS   = 
"https://people.apache.org/keys/group/openoffice.asc";;
-                       CHECKSUM_ASC    = chk_link + ".asc";
-                       CHECKSUM_MD5    = chk_link + ".md5";
-                       CHECKSUM_SHA256 = chk_link + ".sha256";
                }
+               // If language is supported and platform was recognized, 
assemble the filenames for download and checksums.
+               LINK            = SOURCEFORGE_BASE_URL + LANG_ISO + "/" + 
getFilename( VERSION ) + "/download";
+
+               CHECKSUM_KEYS   = 
"https://people.apache.org/keys/group/openoffice.asc";;
+               CHECKSUM_ASC    = APACHE_DIST_BASE_URL + "/binaries/" + 
LANG_ISO + "/" + getFilename( VERSION ) + ".asc";
+               CHECKSUM_MD5    = APACHE_DIST_BASE_URL + "/binaries/" + 
LANG_ISO + "/" + getFilename( VERSION ) + ".md5";
+               CHECKSUM_SHA256 = APACHE_DIST_BASE_URL + "/binaries/" + 
LANG_ISO + "/" + getFilename( VERSION ) + ".sha256";
+
                SOURCEFORGE     = true;
                OTHER           = false;
                ARCHIVE         = false;
                ERROR           = false;
-//             return LINK;
+
+               return LINK;
+
        } else {
-               // If language is not supported, then provide an alternative 
download link.
+               // If language is not supported, provide an alternative 
download link.
                // Release mode
                if ( rel_mode == 1 ) {
                        // Provide the link from the Native Language (NL) group.
-                       LINK = LANG_ARRAY[ 4 ];
+//                     LINK = LANG_ARRAY[ 4 ];
+                       LINK = "http://www.openoffice.org/"; + 
RELEASE_MATRIX_LANG[ 3 ];
                } else {
                        // Beta release mode
                        // Provide the "all_beta.html" as download link.
                        LINK = 
"http://www.openoffice.org/download/all_beta.html";;
                }
-               ERROR = true;
-//             return LINK;
+               SOURCEFORGE     = false;
+               OTHER           = true;
+               ARCHIVE         = false;
+               ERROR           = true;
        }
 
        return LINK;
@@ -352,7 +281,7 @@ function getLink( rel_mode ) {
  * Depends on internal browser data
  */
 function getPlatform() {
-       // For more help or data see: "http://www.useragentstring.com";
+       // For more help or data see: "http://www.useragentstring.com";.
 
        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
@@ -361,9 +290,8 @@ function getPlatform() {
        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
-
+       // Add ECMA262-5 Array methods if not supported natively.
+       // To workaround that MSIE 8 and older do not support this function.
        if ( !( 'indexOf' in Array.prototype ) ) {
                Array.prototype.indexOf= function( find, i ) {  // 'i' is an 
optional parameter
                        if ( i === undefined )
@@ -381,130 +309,130 @@ function getPlatform() {
        }
 
        if ( os ) {
-         // Recognized but not supported platforms/OS, set $UI_PLATFORM to 
show it to the user.
-         if ( os.indexOf( "os/2"               ) != -1 )       UI_PLATFORM     
= "OS/2";
-         if ( os.indexOf( "freebsd"            ) != -1 )       UI_PLATFORM     
= "FreeBSD (PKG)";
-         if ( os.indexOf( "openbsd"            ) != -1 )       UI_PLATFORM     
= "OpenBSD";
-         if ( os.indexOf( "netbsd"             ) != -1 )       UI_PLATFORM     
= "NetBSD";
-         if ( os.indexOf( "pcbsd"              ) != -1 )       UI_PLATFORM     
= "PC-BSD";
-         if ( os.indexOf( "dragonfly"          ) != -1 )       UI_PLATFORM     
= "DragonFly BSD";
-         if ( os.indexOf( "amiga"              ) != -1 )       UI_PLATFORM     
= "AmigaOS";
-         if ( os.indexOf( "darwin"             ) != -1 )       UI_PLATFORM     
= "Darwin";
-         if ( os.indexOf( "aix"                ) != -1 )       UI_PLATFORM     
= "IBM AIX";
-         if ( os.indexOf( "irix"               ) != -1 )       UI_PLATFORM     
= "IRIX";
-         if ( os.indexOf( "vms"                ) != -1 )       UI_PLATFORM     
= "OpenVMS";
-         if ( os.indexOf( "alphaserver"        ) != -1 )       UI_PLATFORM     
= "AlphaServer";
-         if ( os.indexOf( "qnx"                ) != -1 )       UI_PLATFORM     
= "QNX";
-         if ( os.indexOf( "x11"                ) != -1 )       UI_PLATFORM     
= "unknown OS (X11 support)";
-         if ( os.indexOf( "arm"                ) != -1 )       UI_PLATFORM     
= "ARM mobile devices";
-         if ( os.indexOf( "sunos"              ) != -1 ) {     UI_PLATFORM     
= "Solaris x86 (PKG)";
-                                                               OLD_PLATFORM    
= true;
-         }
-         if ( ua.indexOf( "sun4u"              ) != -1 ) {     UI_PLATFORM     
= "Solaris SPARC (PKG)";
-                                                               OLD_PLATFORM    
= true;
-         }
-         if ( ua.indexOf( "ppc"                ) != -1 ||
-              ua.indexOf( "power_pc"           ) != -1 ) {     UI_PLATFORM     
= "Mac OS PPC (DMG)";
-                                                               OLD_PLATFORM    
= true;
-         }
-         if ( ua.indexOf( "iphone"             ) != -1 ||
-              ua.indexOf( "ipad"               ) != -1 ||
-              ua.indexOf( "ipod"               ) != -1 )       UI_PLATFORM     
= "Apple iPhone/iPad/iPod";
-         if ( ua.indexOf( "android"            ) != -1 ||
-              av.indexOf( "android"            ) != -1 )       UI_PLATFORM     
= "Android mobile devices";
-         if ( ua.indexOf( "blackberry"         ) != -1 )       UI_PLATFORM     
= "Blackberry smartphones";
-         if ( ua.indexOf( "nokia"              ) != -1 )       UI_PLATFORM     
= "Nokia mobile devices";
-         if ( ua.indexOf( "symbian"            ) != -1 )       UI_PLATFORM     
= "mobile phones (Symbian OS)";
-         if ( ua.indexOf( "symbos"             ) != -1 )       UI_PLATFORM     
= "mobile phones (Symbian OS)";
-         if ( ua.indexOf( "s60"                ) != -1 )       UI_PLATFORM     
= "mobile phones (Series60/S60)";
-         if ( ua.indexOf( "series60"           ) != -1 )       UI_PLATFORM     
= "mobile phones (Series60/S60)";
-         if ( ua.indexOf( "palm"               ) != -1 )       UI_PLATFORM     
= "mobile phones (Palm OS)";
-         if ( ua.indexOf( "webos"              ) != -1 )       UI_PLATFORM     
= "mobile phones (Palm webOS)";
-         if ( ua.indexOf( "pike"               ) != -1 )       UI_PLATFORM     
= "mobile phones (Pike)";
-         if ( ua.indexOf( "ce.net"             ) != -1 )       UI_PLATFORM     
= "mobile phones (Windows CE)";
-         if ( ua.indexOf( "widerweb"           ) != -1 )       UI_PLATFORM     
= "mobile phones (WiderWeb)";
-         if ( ua.indexOf( "brew"               ) != -1 )       UI_PLATFORM     
= "smartphones (BREW)";
-         if ( ua.indexOf( "hiptop"             ) != -1 )       UI_PLATFORM     
= "smartphones (Hiptop)";
-         if ( ua.indexOf( "playstation"        ) != -1 )       UI_PLATFORM     
= "Sony Playstation";
-         if ( ua.indexOf( "psp"                ) != -1 )       UI_PLATFORM     
= "Sony Playstation Portable";
-         if ( ua.indexOf( "nintendo"           ) != -1 )       UI_PLATFORM     
= "Nintendo game console";
-         if ( ua.indexOf( "wii"                ) != -1 )       UI_PLATFORM     
= "Nintendo Wii game console";
-
-         // If the $UI_PLATFORM variable is already filled, then something was 
recognized and no more work is need.
-         if ( UI_PLATFORM != "" )
-               return;
-
-         // Windows, x86 or mobile?
-         if ( os.indexOf( "windows"            ) != -1 ||
-              os.indexOf( "win"                ) != -1 ) {     UI_PLATFORM     
= "Windows (EXE)";
-                                                               URL_PLATFORM    
= "Win_x86_install";
-                                                               EXTENSION       
= ".exe";
-           if ( ua.indexOf( "phone"            ) != -1 ||
-                ua.indexOf( "mobile"           ) != -1 )       UI_PLATFORM     
= "Windows Mobile device";
-         }
-
-         // Linux, x86 or x86-64, DEB or RPM?
-         if ( os.indexOf( "linux"              ) != -1 ) {
-               // 32-bit, DEB or RPM?
-               if ( os.indexOf( "x86"          ) != -1 ||
-                    os.indexOf( "i686"         ) != -1 ||
-                    os.indexOf( "i586"         ) != -1 ||
-                    os.indexOf( "i486"         ) != -1 ||
-                    os.indexOf( "i386"         ) != -1 ||
-                    av.indexOf( "x86"          ) != -1 ||
-                    av.indexOf( "i686"         ) != -1 ||
-                    av.indexOf( "i586"         ) != -1 ||
-                    av.indexOf( "i486"         ) != -1 ||
-                    av.indexOf( "i386"         ) != -1 ) {     UI_PLATFORM     
= "Linux 32-bit (RPM)";
-                                                               URL_PLATFORM    
= "Linux_x86_install-rpm";
-                                                               EXTENSION       
= ".tar.gz";
-                    if ( ua.indexOf( "debian"    ) != -1 ||
-                         ua.indexOf( "ubuntu"    ) != -1 ||
-                         ua.indexOf( "iceweasel" ) != -1 ) {   UI_PLATFORM     
= "Linux Debian 32-bit (DEB)";
-                                                               URL_PLATFORM    
= "Linux_x86_install-deb";
-                                                               EXTENSION       
= ".tar.gz";
-                    }
+               // Recognized but not supported platforms/OS, set $UI_PLATFORM 
to show it to the user.
+               if ( os.indexOf( "os/2"                 ) != -1 )       
UI_PLATFORM     = "OS/2";
+               if ( os.indexOf( "freebsd"              ) != -1 )       
UI_PLATFORM     = "FreeBSD (PKG)";
+               if ( os.indexOf( "openbsd"              ) != -1 )       
UI_PLATFORM     = "OpenBSD";
+               if ( os.indexOf( "netbsd"               ) != -1 )       
UI_PLATFORM     = "NetBSD";
+               if ( os.indexOf( "pcbsd"                ) != -1 )       
UI_PLATFORM     = "PC-BSD";
+               if ( os.indexOf( "dragonfly"            ) != -1 )       
UI_PLATFORM     = "DragonFly BSD";
+               if ( os.indexOf( "amiga"                ) != -1 )       
UI_PLATFORM     = "AmigaOS";
+               if ( os.indexOf( "darwin"               ) != -1 )       
UI_PLATFORM     = "Darwin";
+               if ( os.indexOf( "aix"                  ) != -1 )       
UI_PLATFORM     = "IBM AIX";
+               if ( os.indexOf( "irix"                 ) != -1 )       
UI_PLATFORM     = "IRIX";
+               if ( os.indexOf( "vms"                  ) != -1 )       
UI_PLATFORM     = "OpenVMS";
+               if ( os.indexOf( "alphaserver"          ) != -1 )       
UI_PLATFORM     = "AlphaServer";
+               if ( os.indexOf( "qnx"                  ) != -1 )       
UI_PLATFORM     = "QNX";
+               if ( os.indexOf( "x11"                  ) != -1 )       
UI_PLATFORM     = "unknown OS (X11 support)";
+               if ( os.indexOf( "arm"                  ) != -1 )       
UI_PLATFORM     = "ARM mobile devices";
+               if ( os.indexOf( "sunos"                ) != -1 ) {     
UI_PLATFORM     = "Solaris x86 (PKG)";
+                                                                       
OLD_PLATFORM    = true;
                }
-               // 64-bit, DEB or RPM?
-               if ( os.indexOf( "_64"          ) != -1 ||
-                    os.indexOf( "-64"          ) != -1 ||
-                    os.indexOf( "x64"          ) != -1 ||
-                    os.indexOf( "amd64"        ) != -1 ||
-                    av.indexOf( "_64"          ) != -1 ||
-                    av.indexOf( "-64"          ) != -1 ||
-                    av.indexOf( "x64"          ) != -1 ||
-                    av.indexOf( "amd64"        ) != -1 ) {     UI_PLATFORM     
= "Linux 64-bit (RPM)";
-                                                               URL_PLATFORM    
= "Linux_x86-64_install-rpm";
-                                                               EXTENSION       
= ".tar.gz";
-                    if ( ua.indexOf( "debian"    ) != -1 ||
-                         ua.indexOf( "ubuntu"    ) != -1 ||
-                         ua.indexOf( "iceweasel" ) != -1 ) {   UI_PLATFORM     
= "Linux Debian 64-bit (DEB)";
-                                                               URL_PLATFORM    
= "Linux_x86-64_install-deb";
-                                                               EXTENSION       
= ".tar.gz";
-                    }
+               if ( ua.indexOf( "sun4u"                ) != -1 ) {     
UI_PLATFORM     = "Solaris SPARC (PKG)";
+                                                                       
OLD_PLATFORM    = true;
+               }
+               if ( ua.indexOf( "ppc"                  ) != -1 ||
+                    ua.indexOf( "power_pc"             ) != -1 ) {     
UI_PLATFORM     = "Mac OS PPC (DMG)";
+                                                                       
OLD_PLATFORM    = true;
+               }
+               if ( ua.indexOf( "iphone"               ) != -1 ||
+                    ua.indexOf( "ipad"                 ) != -1 ||
+                    ua.indexOf( "ipod"                 ) != -1 )       
UI_PLATFORM     = "Apple iPhone/iPad/iPod";
+               if ( ua.indexOf( "android"              ) != -1 ||
+                    av.indexOf( "android"              ) != -1 )       
UI_PLATFORM     = "Android mobile devices";
+               if ( ua.indexOf( "blackberry"           ) != -1 )       
UI_PLATFORM     = "Blackberry smartphones";
+               if ( ua.indexOf( "nokia"                ) != -1 )       
UI_PLATFORM     = "Nokia mobile devices";
+               if ( ua.indexOf( "symbian"              ) != -1 )       
UI_PLATFORM     = "mobile phones (Symbian OS)";
+               if ( ua.indexOf( "symbos"               ) != -1 )       
UI_PLATFORM     = "mobile phones (Symbian OS)";
+               if ( ua.indexOf( "s60"                  ) != -1 )       
UI_PLATFORM     = "mobile phones (Series60/S60)";
+               if ( ua.indexOf( "series60"             ) != -1 )       
UI_PLATFORM     = "mobile phones (Series60/S60)";
+               if ( ua.indexOf( "palm"                 ) != -1 )       
UI_PLATFORM     = "mobile phones (Palm OS)";
+               if ( ua.indexOf( "webos"                ) != -1 )       
UI_PLATFORM     = "mobile phones (Palm webOS)";
+               if ( ua.indexOf( "pike"                 ) != -1 )       
UI_PLATFORM     = "mobile phones (Pike)";
+               if ( ua.indexOf( "ce.net"               ) != -1 )       
UI_PLATFORM     = "mobile phones (Windows CE)";
+               if ( ua.indexOf( "widerweb"             ) != -1 )       
UI_PLATFORM     = "mobile phones (WiderWeb)";
+               if ( ua.indexOf( "brew"                 ) != -1 )       
UI_PLATFORM     = "smartphones (BREW)";
+               if ( ua.indexOf( "hiptop"               ) != -1 )       
UI_PLATFORM     = "smartphones (Hiptop)";
+               if ( ua.indexOf( "playstation"          ) != -1 )       
UI_PLATFORM     = "Sony Playstation";
+               if ( ua.indexOf( "psp"                  ) != -1 )       
UI_PLATFORM     = "Sony Playstation Portable";
+               if ( ua.indexOf( "nintendo"             ) != -1 )       
UI_PLATFORM     = "Nintendo game console";
+               if ( ua.indexOf( "wii"                  ) != -1 )       
UI_PLATFORM     = "Nintendo Wii game console";
+
+               // If the $UI_PLATFORM variable is already filled, something 
was recognized and no more work is need.
+               if ( UI_PLATFORM != "" )
+                       return;
+
+               // Windows, x86 or mobile?
+               if ( os.indexOf( "windows"              ) != -1 ||
+                    os.indexOf( "win"                  ) != -1 ) {     
UI_PLATFORM     = "Windows (EXE)";
+                                                                       
URL_PLATFORM    = "Win_x86_install";
+                                                                       
EXTENSION       = ".exe";
+                    if ( ua.indexOf( "phone"           ) != -1 ||
+                         ua.indexOf( "mobile"          ) != -1 )       
UI_PLATFORM     = "Windows Mobile device";
                }
-         }
 
-         // Mac OS X?
-         if ( os.indexOf( "mac"                ) != -1 ) {     UI_PLATFORM     
= "OS X 64-bit Intel (DMG)";
-                                                               URL_PLATFORM    
= "MacOS_x86-64_install";
-                                                               EXTENSION       
= ".dmg";
-               // OS X is 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 ) {     UI_PLATFORM     
= "Mac OS X (10.6 or older)";
-                                                               URL_PLATFORM    
= "MacOS_x86_install";
-                                                               OLD_PLATFORM    
= true;
+               // Linux, x86 or x86-64, DEB or RPM?
+               if ( os.indexOf( "linux"                ) != -1 ) {
+                       // 32-bit, DEB or RPM?
+                       if ( os.indexOf( "x86"          ) != -1 ||
+                            os.indexOf( "i686"         ) != -1 ||
+                            os.indexOf( "i586"         ) != -1 ||
+                            os.indexOf( "i486"         ) != -1 ||
+                            os.indexOf( "i386"         ) != -1 ||
+                            av.indexOf( "x86"          ) != -1 ||
+                            av.indexOf( "i686"         ) != -1 ||
+                            av.indexOf( "i586"         ) != -1 ||
+                            av.indexOf( "i486"         ) != -1 ||
+                            av.indexOf( "i386"         ) != -1 ) {     
UI_PLATFORM     = "Linux 32-bit (RPM)";
+                                                                       
URL_PLATFORM    = "Linux_x86_install-rpm";
+                                                                       
EXTENSION       = ".tar.gz";
+                            if ( ua.indexOf( "debian"    ) != -1 ||
+                                 ua.indexOf( "ubuntu"    ) != -1 ||
+                                 ua.indexOf( "iceweasel" ) != -1 ) {   
UI_PLATFORM     = "Linux Debian 32-bit (DEB)";
+                                                                       
URL_PLATFORM    = "Linux_x86_install-deb";
+                                                                       
EXTENSION       = ".tar.gz";
+                            }
+                       }
+                       // 64-bit, DEB or RPM?
+                       if ( os.indexOf( "_64"          ) != -1 ||
+                            os.indexOf( "-64"          ) != -1 ||
+                            os.indexOf( "x64"          ) != -1 ||
+                            os.indexOf( "amd64"        ) != -1 ||
+                            av.indexOf( "_64"          ) != -1 ||
+                            av.indexOf( "-64"          ) != -1 ||
+                            av.indexOf( "x64"          ) != -1 ||
+                            av.indexOf( "amd64"        ) != -1 ) {     
UI_PLATFORM     = "Linux 64-bit (RPM)";
+                                                                       
URL_PLATFORM    = "Linux_x86-64_install-rpm";
+                                                                       
EXTENSION       = ".tar.gz";
+                            if ( ua.indexOf( "debian"    ) != -1 ||
+                                 ua.indexOf( "ubuntu"    ) != -1 ||
+                                 ua.indexOf( "iceweasel" ) != -1 ) {   
UI_PLATFORM     = "Linux Debian 64-bit (DEB)";
+                                                                       
URL_PLATFORM    = "Linux_x86-64_install-deb";
+                                                                       
EXTENSION       = ".tar.gz";
+                            }
+                       }
                }
-         } 
+
+               // Mac OS X?
+               if ( os.indexOf( "mac"                  ) != -1 ) {     
UI_PLATFORM     = "OS X 64-bit Intel (DMG)";
+                                                                       
URL_PLATFORM    = "MacOS_x86-64_install";
+                                                                       
EXTENSION       = ".dmg";
+                       // OS X is 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 ) {     
UI_PLATFORM     = "Mac OS X (10.6 or older)";
+                                                                       
URL_PLATFORM    = "MacOS_x86_install";
+                                                                       
OLD_PLATFORM    = true;
+                       }
+               } 
        } 
 
-       // If nothing was recognized until now, set $UI_PLATFORM to show it to 
the user
+       // If nothing was recognized until now, set $UI_PLATFORM to show it to 
the user.
        if ( UI_PLATFORM == "" ) {
                UI_PLATFORM = "unknown platform/OS";
                ERROR       = true;
@@ -514,11 +442,25 @@ function getPlatform() {
 }
 
 /*
+ * Get file name for download file
+ * Depends on version, platform, language and extension
+ */
+function getFilename( ver ) {
+       // Assemble the filename for download.
+       FILENAME        = "Apache_OpenOffice_" + ver + "_" + URL_PLATFORM + "_" 
+ LANG_ISO + EXTENSION;
+
+       // Assign the file name (column 3) from the release matrix of language 
and platform.
+       // FILENAME     = release_matrix_410[ LANG_ISO ][ 
RELEASE_MATRIX_PLATFORM_POS ][ 3 ];
+
+       return FILENAME;
+}
+
+/*
  * Get file size for download file
  * Depends on array-list and "release_matrix.js"
  */
 function getFilesize() {
-       // Depending on $URL_PLATFORM assign the platform position of the 
release matrix
+       // Depending on $URL_PLATFORM assign the platform position of the 
release matrix.
        switch ( URL_PLATFORM ) {
                case "Linux_x86-64_install-deb":
                        RELEASE_MATRIX_PLATFORM_POS = 1;
@@ -545,11 +487,11 @@ function getFilesize() {
                        RELEASE_MATRIX_PLATFORM_POS = -1;
        }
 
-       // If a platform was found and no error occurred, assign the array data 
and filesize from the release matrix
+       // If a platform was found and no error occurred, assign the array data 
and filesize from the release matrix.
        if ( RELEASE_MATRIX_PLATFORM_POS > -1 && !ERROR ) {
-               // Assign all values from the release matrix of language and 
platform
+               // Assign all values from the release matrix of language and 
platform.
                RELEASE_MATRIX_PLATFORM = release_matrix_410[ LANG_ISO ][ 
RELEASE_MATRIX_PLATFORM_POS ];
-               // Assign the file size (column 2) from the release matrix of 
language and platform
+               // Assign the file size (column 2) from the release matrix of 
language and platform.
                FILESIZE                = release_matrix_410[ LANG_ISO ][ 
RELEASE_MATRIX_PLATFORM_POS ][ 2 ];
        } else {
                ERROR    = true;


Reply via email to