Author: marcus
Date: Mon Jun  2 18:40:40 2014
New Revision: 1599304

URL: http://svn.apache.org/r1599304
Log:
Reworked the code for finding the correct platform to assemble the download link

Modified:
    openoffice/ooo-site/trunk/content/download/test/download_droplist.js

Modified: openoffice/ooo-site/trunk/content/download/test/download_droplist.js
URL: 
http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/test/download_droplist.js?rev=1599304&r1=1599303&r2=1599304&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/test/download_droplist.js 
(original)
+++ openoffice/ooo-site/trunk/content/download/test/download_droplist.js Mon 
Jun  2 18:40:40 2014
@@ -83,7 +83,9 @@ function initVars() {
        LANG_ARRAY                              = "";    // This array contains 
all language specific data.
        UI_PLATFORM                             = "";    // The platform as 
readable string.
        UI_PLATFORM_NO_SUP                      = "";    // The platform as 
readable string, if not supported.
-       URL_PLATFORM                            = "";    // The platform as 
part of the download URL.
+       PLATFORM                                = "";    // The platform in 
short form.
+       PLATFORM_FULL                           = "";    // The platform as 
part of the download URL (full install).
+       PLATFORM_LP                             = "";    // The platform as 
part of the download URL (langpack).
        OLD_PLATFORM                            = false; // Is the browser 
platform old (true) or not (false)?
        RELEASE_PLATFORM_POS_FULL               = 0;     // The position of the 
platform in the release matrix array (full install).
        RELEASE_PLATFORM_POS_LP                 = 0;     // The position of the 
platform in the release matrix array (langpack).
@@ -112,8 +114,8 @@ function initVars() {
        SOURCEFORGE_BASE_URL                    = "";    // The base URL for 
all binary files on Sourceforge.
        SOURCEFORGE_PREV_URL                    = "";    // The base URL for 
all binary files (prev. version) on Sourceforge.
        ASF_BASE_URL                            = "";    // The base URL for 
all binary files on Apache.
-       ASF_DIST_BASE_URL                       = "";    // The base URL for 
all checksum files on Apache.
-       ASF_DIST_PREV_URL                       = "";    // The base URL for 
all checksum files (prev. version) on Apache.
+//     ASF_DIST_BASE_URL                       = "";    // The base URL for 
all checksum files on Apache.
+//     ASF_DIST_PREV_URL                       = "";    // The base URL for 
all checksum files (prev. version) on Apache.
        ASF_ARC_BASE_URL                        = "";    // The base URL for 
all checksum files on Apache.
        ASF_ARC_PREV_URL                        = "";    // The base URL for 
all checksum files (prev. version) on Apache.
        SF                                      = false; // Does the download 
URL points to Soureforge?
@@ -320,7 +322,7 @@ function fillVerSel() {
  * Depends on OS data from browser
  */
 function setOSSel() {
-       // Depending on $URL_PLATFORM assign the platform string of the release 
matrix.
+       // Depending on $PLATFORM assign the platform string of the release 
matrix.
        var sel_os = document.getElementById( "os" );
 //     var sel_os_text = 
document.download.os.options[document.download.os.selectedIndex].text;
 //     PLATFORM_SEL = sel_os.value;
@@ -328,7 +330,7 @@ function setOSSel() {
 /*
        alert( ""
        + "setOSSel() : Before switch"                                          
+ "\n\n"
-       + "URL_PLATFORM: "              + "\t\t\t"      + URL_PLATFORM          
+ "\n"
+       + "PLATFORM: "                  + "\t\t\t"      + PLATFORM              
+ "\n"
        + "sel_os.selectedIndex: "      + "\t"          + sel_os.selectedIndex  
+ "\n"
        + "sel_os.value: "              + "\t\t\t"      + sel_os.value          
+ "\n"
        + "sel_os_text: "               + "\t\t\t"      + sel_os_text           
+ "\n"
@@ -337,17 +339,17 @@ function setOSSel() {
        + "" );
 */
 
-//     URL_PLATFORM = "";
+//     PLATFORM = "";
 
        // Set the recognized browser platform as default for the select box.
 //     alert( "SEL_OS.length: " + SEL_OS.length / 3 );
-//     alert( "URL_PLATFORM: " + URL_PLATFORM );
+//     alert( "PLATFORM: "      + PLATFORM );
 //     alert( "sel_os.selectedIndex: " + sel_os.selectedIndex );
 //     for( var i = 0; i < SEL_OS.length; i = i + 3 ) {
        for( var i = 0, j = SEL_OS.length; i < j; i = i + 3 ) {
                // If the platform was found, assign the found index to the 
select box.
 //             alert( "i: " + i / 2 + "\n" + "SEL_OS[ i ]: " + SEL_OS[ i ] );
-               if( SEL_OS[ i ] === URL_PLATFORM ) {
+               if( SEL_OS[ i ] === PLATFORM ) {
                        sel_os.selectedIndex = i / 3;
 //                     alert( "Assigned: " + i / 3 );
                        break;
@@ -372,7 +374,7 @@ function setOSSel() {
                }
        }
 /*
-       switch( URL_PLATFORM ) {
+       switch( PLATFORM ) {
                case "Linux_x86-64_install-deb":
                        sel_os.selectedIndex = 3;
                        break;
@@ -412,7 +414,7 @@ function setOSSel() {
 /*
        alert( ""
        + "setOSSel() : After switch"                                           
        + "\n\n"
-       + "URL_PLATFORM: "              + "\t\t\t"      + URL_PLATFORM          
        + "\n"
+       + "PLATFORM: "          + "\t\t\t"      + PLATFORM                      
+ "\n"
        + "sel_os.selectedIndex: "      + "\t"          + sel_os.selectedIndex  
        + "\n"
        + "sel_os.value: "              + "\t\t\t"      + sel_os.value          
        + "\n"
 //     + "sel_os_text: "               + "\t\t\t"      + sel_os_text           
        + "\n"
@@ -612,7 +614,7 @@ function getOSSel() {
        if( os_value == "e0" || os_value == "e1" ) {
                PLATFORM_SEL            = "";
                UI_PLATFORM             = "";
-               URL_PLATFORM            = "";
+               PLATFORM                = "";
                EXTENSION               = "";
                sel_os.selectedIndex    = 0;
                resetElements();
@@ -644,7 +646,7 @@ function getOSSel() {
                }
        }
 
-       URL_PLATFORM = PLATFORM_SEL;
+       PLATFORM = PLATFORM_SEL;
 
 //     alertDbg( "getOSSel() : After if + for" );
 /*
@@ -756,14 +758,14 @@ function getTypeSel() {
 
        switch( type_value ) {
                case "full":
-                       // If install type == 'install', then exchange it in 
the 'URL_PLATFORM' variable.
-                       TYPE            = "install";
-                       URL_PLATFORM    = URL_PLATFORM.replace(/langpack/g, 
TYPE);
+                       // If install type == 'install', then exchange it in 
the 'PLATFORM' variable.
+                       TYPE     = "install";
+                       PLATFORM = PLATFORM.replace(/langpack/g, TYPE);
                        break;
                case "lp":
-                       // If install type == 'langpack', then exchange it in 
the 'URL_PLATFORM' variable.
-                       TYPE            = "langpack";
-                       URL_PLATFORM    = URL_PLATFORM.replace(/install/g, 
TYPE);
+                       // If install type == 'langpack', then exchange it in 
the 'PLATFORM' variable.
+                       TYPE     = "langpack";
+                       PLATFORM = PLATFORM.replace(/install/g, TYPE);
                        break;
                default:
                        TYPE = "";
@@ -1095,7 +1097,7 @@ function getLink( rel_mode ) {
                        }
 
                // If language is supported but no platform was recognized, 
provide a general download link to "other.html".
-               } else if( URL_PLATFORM === "" ) {
+               } else if( PLATFORM === "" ) {
                        // If no UI string was set, show it to the user.
                        if( UI_PLATFORM === "" ) {
                                UI_PLATFORM = "an unknown operating system / 
platform";
@@ -1190,8 +1192,8 @@ function getLinkSel() {
        + "LANG_SEL: " + LANG_SEL + "\n\n"
        + "" );
 */
-//     if( URL_PLATFORM == "" || LANG_ISO == "" ) {
-//     if( URL_PLATFORM == "" || LANG_ISO == "" || VERSION_SEL == "" ) {
+//     if( PLATFORM == "" || LANG_ISO == "" ) {
+//     if( PLATFORM == "" || LANG_ISO == "" || VERSION_SEL == "" ) {
 /*     if( PLATFORM_SEL == "" || LANG_SEL == "" || VERSION_SEL == "" ) {
                // When OS or language was not chosen, let the user choose 
again.
                // When OS, language or version was not chosen, let the user 
choose again.
@@ -1213,7 +1215,7 @@ function getLinkSel() {
        }
 
        // If version is '4.1.0' (or newer) and platform is 'Mac OS X <= 10.6', 
show the none-availability to the user.
-       if( VERSION_SEL === "4.1.0" && URL_PLATFORM === "MacOS_x86_install" ) {
+       if( VERSION_SEL === "4.1.0" && PLATFORM === "mac32" ) {
                // Show an error message that the chosen items do not lead to a 
download.
                error_text = "<b>Problem:</b> &nbsp;Apache OpenOffice " + 
VERSION_SEL + " is not available for <b>"
                             + UI_PLATFORM + "</b>."
@@ -1225,7 +1227,7 @@ function getLinkSel() {
        }
 
        // If version is '4.0.1' (or older) and platform is 'Mac OS X >= 10.7', 
show the none-availability to the user.
-       if( ( VERSION_SEL === "4.0.1" || VERSION_SEL === "4.0.0" ) && 
URL_PLATFORM === "MacOS_x86-64_install" ) {
+       if( ( VERSION_SEL === "4.0.1" || VERSION_SEL === "4.0.0" ) && PLATFORM 
=== "mac64" ) {
                // Set the values for all elements that should not be empty.
                error_text = "<b>Problem:</b> Apache OpenOffice " + VERSION_SEL 
+ " is not available for <b>"
                             + UI_PLATFORM + "</b>."
@@ -1409,7 +1411,7 @@ function getPlatform() {
        var av             = navigator.appVersion.toLowerCase();        // Get 
the application version in lower cases.
        UI_PLATFORM        = "";                                        // 
Delete previously set string.
        UI_PLATFORM_NO_SUP = "false";                                   // 
Delete previously set string.
-       URL_PLATFORM       = "";                                        // 
Delete previously set string.
+       PLATFORM           = "";                                        // 
Delete previously set string.
        EXTENSION          = "";                                        // 
Delete previously set string.
 
        // Add ECMA262-5 Array methods if not supported natively.
@@ -1451,7 +1453,7 @@ function getPlatform() {
                if( ua.indexOf( "hiptop"                ) !== -1 )      
UI_PLATFORM_NO_SUP      = "smartphones (Hiptop)";
                if( ua.indexOf( "ipad"                  ) !== -1 ||
                    ua.indexOf( "iphone"                ) !== -1 ||
-                   ua.indexOf( "ipod"                  ) !== -1        )       
UI_PLATFORM_NO_SUP      = "Apple iPhone/iPad/iPod";
+                   ua.indexOf( "ipod"                  ) !== -1 )      
UI_PLATFORM_NO_SUP      = "Apple iPhone/iPad/iPod";
                if( os.indexOf( "irix"                  ) !== -1 )      
UI_PLATFORM_NO_SUP      = "IRIX";
                if( ua.indexOf( "kindle"                ) !== -1 )      
UI_PLATFORM_NO_SUP      = "Amazon Kindle";
                if( os.indexOf( "netbsd"                ) !== -1 )      
UI_PLATFORM_NO_SUP      = "NetBSD";
@@ -1486,12 +1488,12 @@ function getPlatform() {
 
                // If $UI_PLATFORM_NO_SUP is already filled, something was 
recognized and no more work is needed.
                if( UI_PLATFORM_NO_SUP !== "false" )
-                       return URL_PLATFORM;
+                       return PLATFORM;
 
                // Windows?
                if( os.indexOf( "win"                   ) !== -1 ||
                    os.indexOf( "windows"               ) !== -1 ) {    
UI_PLATFORM     = "Windows (EXE)";
-                                                                       
URL_PLATFORM    = "Win_x86_install";
+                                                                       
PLATFORM        = "win32";
                                                                        
EXTENSION       = ".exe";
                }
 
@@ -1508,12 +1510,12 @@ function getPlatform() {
                            av.indexOf( "i586"          ) !== -1 ||
                            av.indexOf( "i486"          ) !== -1 ||
                            av.indexOf( "i386"          ) !== -1 ) {    
UI_PLATFORM     = "Linux 32-bit (x86) (RPM)";
-                                                                       
URL_PLATFORM    = "Linux_x86_install-rpm";
+                                                                       
PLATFORM        = "lnx32r";
                                                                        
EXTENSION       = ".tar.gz";
                             if( ua.indexOf( "debian"    ) !== -1 ||
                                 ua.indexOf( "iceweasel" ) !== -1 ||
                                 ua.indexOf( "ubuntu"    ) !== -1 ) {   
UI_PLATFORM     = "Linux Debian 32-bit (x86) (DEB)";
-                                                                       
URL_PLATFORM    = "Linux_x86_install-deb";
+                                                                       
PLATFORM        = "lnx32d";
                                                                        
EXTENSION       = ".tar.gz";
                             }
                        }
@@ -1527,12 +1529,12 @@ function getPlatform() {
                            av.indexOf( "-64"           ) !== -1 ||
                            av.indexOf( "x64"           ) !== -1 ||
                            av.indexOf( "amd64"         ) !== -1 ) {    
UI_PLATFORM     = "Linux 64-bit (x86-64) (RPM)";
-                                                                       
URL_PLATFORM    = "Linux_x86-64_install-rpm";
+                                                                       
PLATFORM        = "lnx64r";
                                                                        
EXTENSION       = ".tar.gz";
                             if( ua.indexOf( "debian"    ) !== -1 ||
                                 ua.indexOf( "iceweasel" ) !== -1 ||
                                 ua.indexOf( "ubuntu"    ) !== -1 ) {   
UI_PLATFORM     = "Linux Debian 64-bit (x86-64) (DEB)";
-                                                                       
URL_PLATFORM    = "Linux_x86-64_install-deb";
+                                                                       
PLATFORM        = "lnx64d";
                                                                        
EXTENSION       = ".tar.gz";
                             }
                        }
@@ -1540,7 +1542,7 @@ function getPlatform() {
 
                // Mac OS X?
                if( os.indexOf( "mac"                   ) !== -1 ) {    
UI_PLATFORM     = "OS X 64-bit (x86-64) (DMG)";
-                                                                       
URL_PLATFORM    = "MacOS_x86-64_install";
+                                                                       
PLATFORM        = "mac64";
                                                                        
EXTENSION       = ".dmg";
                        // OS X is 10.6 or older?
                        if( ua.indexOf( "10.6"          ) !== -1 ||
@@ -1551,7 +1553,7 @@ function getPlatform() {
                            ua.indexOf( "10_4"          ) !== -1 ||
                            ua.indexOf( "10.3"          ) !== -1 ||
                            ua.indexOf( "10_3"          ) !== -1 ) {    
UI_PLATFORM     = "Mac OS X (<= 10.6)";
-                                                                       
URL_PLATFORM    = "MacOS_x86_install";
+                                                                       
PLATFORM        = "mac32";
                                                                        
OLD_PLATFORM    = true;
                        }
                } 
@@ -1563,7 +1565,7 @@ function getPlatform() {
                ERROR       = true;
        }
 
-       return URL_PLATFORM;
+       return PLATFORM;
 }
 
 /*
@@ -1571,42 +1573,49 @@ function getPlatform() {
  * Depends on platform and array-list of "release_matrix.js"
  */
 function getReleaseMatrixPos() {
-       // Depending on $URL_PLATFORM, assign the platform position from the 
release matrix.
-       switch( URL_PLATFORM ) {
-               case "Linux_x86-64_install-deb":
-               case "Linux_x86-64_langpack-deb":
+       // Depending on $PLATFORM, assign the platform position from the 
release matrix.
+       switch( PLATFORM ) {
+               case "lnx64d":
                        RELEASE_PLATFORM_POS_FULL = 1;
                        RELEASE_PLATFORM_POS_LP   = 2;
+                       PLATFORM_FULL             = "Linux_x86-64_install-deb";
+                       PLATFORM_LP               = "Linux_x86-64_langpack-deb";
                        break;
-               case "Linux_x86-64_install-rpm":
-               case "Linux_x86-64_langpack-rpm":
+               case "lnx64r":
                        RELEASE_PLATFORM_POS_FULL = 3;
                        RELEASE_PLATFORM_POS_LP   = 4;
+                       PLATFORM_FULL             = "Linux_x86-64_install-rpm";
+                       PLATFORM_LP               = "Linux_x86-64_langpack-rpm";
                        break;
-               case "Linux_x86_install-deb":
-               case "Linux_x86_langpack-deb":
+               case "lnx32d":
                        RELEASE_PLATFORM_POS_FULL = 5;
                        RELEASE_PLATFORM_POS_LP   = 6;
+                       PLATFORM_FULL             = "Linux_x86_install-deb";
+                       PLATFORM_LP               = "Linux_x86_langpack-deb";
                        break;
-               case "Linux_x86_install-rpm":
-               case "Linux_x86_langpack-rpm":
+               case "lnx32r":
                        RELEASE_PLATFORM_POS_FULL = 7;
                        RELEASE_PLATFORM_POS_LP   = 8;
+                       PLATFORM_FULL             = "Linux_x86_install-rpm";
+                       PLATFORM_LP               = "Linux_x86_langpack-rpm";
                        break;
-               case "MacOS_x86-64_install":
-               case "MacOS_x86-64_langpack":
+               case "mac64":
                        RELEASE_PLATFORM_POS_FULL = 9;
                        RELEASE_PLATFORM_POS_LP   = 10;
+                       PLATFORM_FULL             = "MacOS_x86-64_install";
+                       PLATFORM_LP               = "MacOS_x86-64_langpack";
                        break;
-               case "MacOS_x86_install":
-               case "MacOS_x86_langpack":
+               case "mac32":
                        RELEASE_PLATFORM_POS_FULL = 9;
                        RELEASE_PLATFORM_POS_LP   = 10;
+                       PLATFORM_FULL             = "MacOS_x86_install";
+                       PLATFORM_LP               = "MacOS_x86_langpack";
                        break;
-               case "Win_x86_install":
-               case "Win_x86_langpack":
+               case "win32":
                        RELEASE_PLATFORM_POS_FULL = 11;
                        RELEASE_PLATFORM_POS_LP   = 12;
+                       PLATFORM_FULL             = "Win_x86_install";
+                       PLATFORM_LP               = "Win_x86_langpack";
                        break;
                default:
                        RELEASE_PLATFORM_POS_FULL = -1;
@@ -1623,88 +1632,73 @@ function getReleaseMatrixPos() {
  */
 // function getFilename( ver ) {
 function getFileData( ver ) {
-       var thisReleaseMatrixSet = "";
+//     var thisReleaseMatrixSet = "";
 
        // Depending on $ver, a different release matrix has to be used to 
assemble the download filenames.
        switch( ver ) {
                case "4.1.0":
                        // Assign all values from the release matrix of 
language and platform.
-                       RELEASE_PLATFORM        = release_410[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ];
+                       RELEASE_PLATFORM = release_410[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ];
 
-                       // Assemble filename for download from release matrix 
of language and platform (column 0).
-                       // Product name + version + platform as URL part + 
language ISO + file extension.
-                       FILENAME_FULL = "Apache_OpenOffice_" + ver + "_"
-                                       + release_410[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ][ 0 ] + "_"
-                                       + LANG_ISO + EXTENSION;
-                       FILENAME_LP   = "Apache_OpenOffice_" + ver + "_"
-                                       + release_410[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_LP   ][ 0 ] + "_"
-                                       + LANG_ISO + EXTENSION;
+                       // Assemble filename: Product name + version + platform 
as URL part + language ISO + file extension.
+                       FILENAME_FULL    = "Apache_OpenOffice_" + ver + "_" + 
PLATFORM_FULL + "_" + LANG_ISO + EXTENSION;
+                       FILENAME_LP      = "Apache_OpenOffice_" + ver + "_" + 
PLATFORM_LP   + "_" + LANG_ISO + EXTENSION;
 
                        // Assign the file size (column 2) from the release 
matrix of language and platform.
-                       FILESIZE_FULL = release_410[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ][ 2 ];
-                       FILESIZE_LP   = release_410[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_LP   ][ 2 ];
+                       FILESIZE_FULL    = release_410[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ][ 2 ];
+                       FILESIZE_LP      = release_410[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_LP   ][ 2 ];
 
                        // Assign all values from the release data.
-                       REL_TEXT      = "Milestone "     + release_410[ "src" 
][ 1 ][ 0 ]
-                                       + " | Build ID " + release_410[ "src" 
][ 1 ][ 1 ]
-                                       + " | SVN "      + release_410[ "src" 
][ 1 ][ 2 ]
-                                       + " | Released " + release_410[ "src" 
][ 1 ][ 3 ];
+                       REL_TEXT         = "Milestone "     + release_410[ 
"src" ][ 1 ][ 0 ]
+                                        + " | Build ID "   + release_410[ 
"src" ][ 1 ][ 1 ]
+                                        + " | SVN "        + release_410[ 
"src" ][ 1 ][ 2 ]
+                                        + " | Released "   + release_410[ 
"src" ][ 1 ][ 3 ];
                        break;
                case "4.0.1":
                        // Assign all values from the release matrix of 
language and platform.
-                       RELEASE_PLATFORM        = release_401[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ];
+                       RELEASE_PLATFORM = release_401[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ];
 
-                       // Assemble filename for download from release matrix 
of language and platform (column 0).
-                       // Product name + version + platform as URL part + 
language ISO + file extension.
-                       FILENAME_FULL = "Apache_OpenOffice_" + ver + "_"
-                                       + release_401[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ][ 0 ] + "_"
-                                       + LANG_ISO + EXTENSION;
-                       FILENAME_LP   = "Apache_OpenOffice_" + ver + "_"
-                                       + release_401[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_LP   ][ 0 ] + "_"
-                                       + LANG_ISO + EXTENSION;
+                       // Assemble filename: Product name + version + platform 
as URL part + language ISO + file extension.
+                       FILENAME_FULL    = "Apache_OpenOffice_" + ver + "_" + 
PLATFORM_FULL + "_" + LANG_ISO + EXTENSION;
+                       FILENAME_LP      = "Apache_OpenOffice_" + ver + "_" + 
PLATFORM_LP   + "_" + LANG_ISO + EXTENSION;
 
                        // Assign the file size (column 2) from the release 
matrix of language and platform.
-                       FILESIZE_FULL = release_401[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ][ 2 ];
-                       FILESIZE_LP   = release_401[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_LP   ][ 2 ];
+                       FILESIZE_FULL    = release_401[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ][ 2 ];
+                       FILESIZE_LP      = release_401[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_LP   ][ 2 ];
 
                        // Assign all values from the release data.
-                       REL_TEXT      = "Milestone "     + release_401[ "src" 
][ 1 ][ 0 ]
-                                       + " | Build ID " + release_401[ "src" 
][ 1 ][ 1 ]
-                                       + " | SVN "      + release_401[ "src" 
][ 1 ][ 2 ]
-                                       + " | Released " + release_401[ "src" 
][ 1 ][ 3 ];
+                       REL_TEXT         = "Milestone "     + release_401[ 
"src" ][ 1 ][ 0 ]
+                                        + " | Build ID "   + release_401[ 
"src" ][ 1 ][ 1 ]
+                                        + " | SVN "        + release_401[ 
"src" ][ 1 ][ 2 ]
+                                        + " | Released "   + release_401[ 
"src" ][ 1 ][ 3 ];
                        break;
                case "4.0.0":
                        // Todo: Implement a "release_400" array in the 
"release_matrix.js" file.
 
                        // Assign all values from the release matrix of 
language and platform.
-                       RELEASE_PLATFORM        = release_400[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ];
+                       RELEASE_PLATFORM = release_400[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ];
 
-                       // Assemble filename for download from release matrix 
of language and platform (column 0).
-                       // Product name + version + platform as URL part + 
language ISO + file extension.
-                       FILENAME_FULL = "Apache_OpenOffice_" + ver + "_"
-                                       + release_400[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ][ 0 ] + "_"
-                                       + LANG_ISO + EXTENSION;
-                       FILENAME_LP   = "Apache_OpenOffice_" + ver + "_"
-                                       + release_400[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_LP   ][ 0 ] + "_"
-                                       + LANG_ISO + EXTENSION;
+                       // Assemble filename: Product name + version + platform 
as URL part + language ISO + file extension.
+                       FILENAME_FULL    = "Apache_OpenOffice_" + ver + "_" + 
PLATFORM_FULL + "_" + LANG_ISO + EXTENSION;
+                       FILENAME_LP      = "Apache_OpenOffice_" + ver + "_" + 
PLATFORM_LP   + "_" + LANG_ISO + EXTENSION;
 
                        // Assign the file size (column 2) from the release 
matrix of language and platform.
-                       FILESIZE_FULL = release_400[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ][ 2 ];
-                       FILESIZE_LP   = release_400[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_LP   ][ 2 ];
+                       FILESIZE_FULL    = release_400[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ][ 2 ];
+                       FILESIZE_LP      = release_400[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_LP   ][ 2 ];
 
                        // Assign all values from the release data.
-                       REL_TEXT      = "Milestone "     + release_400[ "src" 
][ 1 ][ 0 ]
-                                       + " | Build ID " + release_400[ "src" 
][ 1 ][ 1 ]
-                                       + " | SVN "      + release_400[ "src" 
][ 1 ][ 2 ]
-                                       + " | Released " + release_400[ "src" 
][ 1 ][ 3 ];
+                       REL_TEXT         = "Milestone "     + release_400[ 
"src" ][ 1 ][ 0 ]
+                                        + " | Build ID "   + release_400[ 
"src" ][ 1 ][ 1 ]
+                                        + " | SVN "        + release_400[ 
"src" ][ 1 ][ 2 ]
+                                        + " | Released "   + release_400[ 
"src" ][ 1 ][ 3 ];
                        break;
                default:
-                       FILENAME_FULL = "";
-                       FILENAME_LP   = "";
-                       FILESIZE_FULL = 0;
-                       FILESIZE_LP   = 0;
-                       REL_TEXT      = "Milestone ? | Build ID ? | SVN ? | 
Released ?";
-                       ERROR         = true;
+                       FILENAME_FULL    = "";
+                       FILENAME_LP      = "";
+                       FILESIZE_FULL    = 0;
+                       FILESIZE_LP      = 0;
+                       REL_TEXT         = "Milestone ? | Build ID ? | SVN ? | 
Released ?";
+                       ERROR            = true;
        }
 /*
        // Assemble the filename for download from the release matrix of 
language and platform (column 0).
@@ -1726,41 +1720,34 @@ function getFileData( ver ) {
  * Depends on platform, version and array-list of "release_matrix.js"
  */
 function getFilesize( ver ) {
-       // Depending on $URL_PLATFORM, assign the platform position from the 
release matrix.
+       // Depending on $PLATFORM, assign the platform position from the 
release matrix.
 /*
-       switch( URL_PLATFORM ) {
-               case "Linux_x86-64_install-deb":
-               case "Linux_x86-64_langpack-deb":
+       switch( PLATFORM ) {
+               case "lnx64d":
                        RELEASE_PLATFORM_POS_FULL = 1;
                        RELEASE_PLATFORM_POS_LP   = 2;
                        break;
-               case "Linux_x86-64_install-rpm":
-               case "Linux_x86-64_langpack-rpm":
+               case "lnx64rpm":
                        RELEASE_PLATFORM_POS_FULL = 3;
                        RELEASE_PLATFORM_POS_LP   = 4;
                        break;
-               case "Linux_x86_install-deb":
-               case "Linux_x86_langpack-deb":
+               case "lnx32d":
                        RELEASE_PLATFORM_POS_FULL = 5;
                        RELEASE_PLATFORM_POS_LP   = 6;
                        break;
-               case "Linux_x86_install-rpm":
-               case "Linux_x86_langpack-rpm":
+               case "lnx32r":
                        RELEASE_PLATFORM_POS_FULL = 7;
                        RELEASE_PLATFORM_POS_LP   = 8;
                        break;
-               case "MacOS_x86-64_install":
-               case "MacOS_x86-64_langpack":
+               case "mac64":
                        RELEASE_PLATFORM_POS_FULL = 9;
                        RELEASE_PLATFORM_POS_LP   = 10;
                        break;
-               case "MacOS_x86_install":
-               case "MacOS_x86_langpack":
+               case "mac32":
                        RELEASE_PLATFORM_POS_FULL = 9;
                        RELEASE_PLATFORM_POS_LP   = 10;
                        break;
-               case "Win_x86_install":
-               case "Win_x86_langpack":
+               case "win32":
                        RELEASE_PLATFORM_POS_FULL = 11;
                        RELEASE_PLATFORM_POS_LP   = 12;
                        break;
@@ -1840,7 +1827,7 @@ function alertDbg( location ) {
        + "RELEASE_LANG: "                      + "\t\t\t\t\t\t"        + 
RELEASE_LANG                          + "\n"
        + "UI_PLATFORM: "                       + "\t\t\t\t\t\t"        + 
UI_PLATFORM                           + "\n"
        + "UI_PLATFORM_NO_SUP: "                + "\t\t\t\t"            + 
UI_PLATFORM_NO_SUP                    + "\n"
-       + "URL_PLATFORM: "                      + "\t\t\t\t\t\t"        + 
URL_PLATFORM                          + "\n"
+       + "PLATFORM: "                          + "\t\t\t\t\t\t"        + 
PLATFORM                              + "\n"
        + "OLD_PLATFORM: "                      + "\t\t\t\t\t"          + 
OLD_PLATFORM                          + "\n"
        + "LANG_SEL: "                          + "\t\t\t\t\t\t"        + 
LANG_SEL                              + "\n"
        + "PLATFORM_SEL: "                      + "\t\t\t\t\t\t"        + 
PLATFORM_SEL                          + "\n"


Reply via email to