Author: marcus
Date: Sat Jun 21 14:36:17 2014
New Revision: 1604406

URL: http://svn.apache.org/r1604406
Log:
Updated variable and function names for better readability

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

Modified: openoffice/ooo-site/trunk/content/download/test/download.js
URL: 
http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/test/download.js?rev=1604406&r1=1604405&r2=1604406&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/test/download.js (original)
+++ openoffice/ooo-site/trunk/content/download/test/download.js Sat Jun 21 
14:36:17 2014
@@ -1,58 +1,58 @@
 /*
  * Overview of all functions defined below
  * ------------------------------------------
- * function init               ()
- * function initVars           ()
- * function getLanguage                ()
- * function fillOSSel          ()
- * function fillLangSel                ()
- * function fillVerSel         ()
- * function getOSSel           ()
- * function getLangSel         ()
- * function getVerSel          ()
- * function setOSSel           ()
- * function setLangSel         ()
- * function setVerSel          ()
- * function resetElements      ()
- * function showWindow         ( target_link )
- * function showErrorMessage   ( error_text )
- * function isLangSupported    ()
- * function checkLinkExceptions ()
- * function getLinkSel         ()
- * function getPlatform                ()
- * function getReleaseMatrixPos        ()
- * function getFileData                ( ver )
- * function openItem           ( itemid, uri )
- * function alertDbg           ( location )
+ * function init                       ()
+ * function initVariables              ()
+ * function getLanguage                        ()
+ * function fillOSSelection            ()
+ * function fillLanguageSelection      ()
+ * function fillVersionSelection       ()
+ * function getOSSelection             ()
+ * function getLanguageSelection       ()
+ * function getVersionSelection                ()
+ * function setOSSelection             ()
+ * function setLanguageSelection       ()
+ * function setVersionSelection                ()
+ * function hideElements               ()
+ * function showWindow                 ( target_link )
+ * function showErrorMessage           ( error_text )
+ * function isLanguageSupported                ()
+ * function checkForLinkExceptions     ()
+ * function getLinkSelection           ()
+ * function getPlatform                        ()
+ * function getReleaseMatrixPosition   ()
+ * function getFileData                        ( version )
+ * function openItem                   ( itemid, uri )
+ * function debug                      ( location )
  */
 
 /*
  * Init function
  */
-function init( mode ) {
+function init( release_mode ) {
        // Set global variables.
-       initVars( 1 );
+       initVariables( 1 );
 
        // Fill the OS, language and version select boxes.
-       fillOSSel()
-       fillLangSel();
-       fillVerSel();
+       fillOSSelection()
+       fillLanguageSelection();
+       fillVersionSelection();
 
-       // Get the platform and language from the browser data.
-       getPlatform();
+       // Get the language and platform from the browser data.
        getLanguage();
+       getPlatform();
 
        // Set the recognized platform and language as default.
-       setOSSel();
-       setLangSel();
-       setVerSel();
+       setOSSelection();
+       setLanguageSelection();
+       setVersionSelection();
 
        
        // When release mode = 2, it is a beta release. Otherwise assume 
"stable release" as default.
-       if( mode === 2 )
-               R_MODE = mode;
+       if( release_mode === 2 )
+               RELEASE_MODE = mode;
 
-       getLinkSel();
+       getLinkSelection();
 
        return;
 }
@@ -60,7 +60,7 @@ function init( mode ) {
 /*
  * Define all global variables with default values
  */
-function initVars( init_all ) {
+function initVariables( init_all ) {
        // Define variables without "var" to make them globally available.
 
        // The following are used in "download.js". and "index.html".
@@ -79,7 +79,7 @@ function initVars( init_all ) {
 
        // All global variables.
        if( init_all === 1 ) {
-               R_MODE                          = 1;     // The release mode (1 
= stable release (default), 2 = beta release, etc.).
+               RELEASE_MODE                    = 1;     // The release mode (1 
= stable release (default), 2 = beta release, etc.).
                LANG_ISO                        = "";    // The language as ISO 
code.
                LANG_SEL                        = "";    // The selected 
language as ISO code from select box.
                UI_PLATFORM_NO_SUP              = "";    // The platform as 
readable string, if not supported.
@@ -116,7 +116,7 @@ function initVars( init_all ) {
        LINK_CHK_ASC_LP                         = "";    // The ASC file as 
download URL (langpack).
        LINK_CHK_MD5_LP                         = "";    // The MD5 file as 
download URL (langpack).
        LINK_CHK_SHA256_LP                      = "";    // The SHA256 file as 
download URL (langpack).
-       SUB_BOX                                 = true; // Is the download URL 
OK to show the sub-box (true) or not (false)?
+       SHOW_SUB_BOX                            = true; // Is the download URL 
OK to show the sub-box (true) or not (false)?
        ERROR                                   = false; // Is the download URL 
in general OK (false) or not (true)?
 
        return;
@@ -209,9 +209,9 @@ function getLanguage() {
  * Set values into the <select> element for OS (select box)
  * Depends on array-list
  */
-function fillOSSel() {
-       var sel_os = document.getElementById( "os" );
-       var option = "";
+function fillOSSelection() {
+       var selection_os = document.getElementById( "os" );
+       var option       = "";
 
        // Fill the <select> element until all OS's are used.
        for( var i = 0, j = SEL_OS.length; i < j; i = i + 3 ) {
@@ -220,7 +220,7 @@ function fillOSSel() {
                option.value = SEL_OS[ i ];
                // Assign the UI platform name.
                option.text  = SEL_OS[ i + 1 ];
-               sel_os.appendChild( option );
+               selection_os.appendChild( option );
        }
 
        return;
@@ -230,9 +230,9 @@ function fillOSSel() {
  * Set values into the <select> element for language (select box)
  * Depends on array-list
  */
-function fillLangSel() {
-       var sel_lang = document.getElementById( "lang" );
-       var option   = "";
+function fillLanguageSelection() {
+       var selection_language = document.getElementById( "language" );
+       var option         = "";
 
        // Fill the <select> element until all languages are used.
        for( var i = 0, j = SEL_LANG.length; i < j; i = i + 2 ) {
@@ -241,7 +241,7 @@ function fillLangSel() {
                option.value = SEL_LANG[ i ];
                // Assign the UI name like "English (Native) (ISO code)".
                option.text  = SEL_LANG[ i + 1 ];
-               sel_lang.appendChild( option );
+               selection_language.appendChild( option );
        }
 
        return;
@@ -251,9 +251,9 @@ function fillLangSel() {
  * Set values into the <select> element for version (select box)
  * Depends on array-list
  */
-function fillVerSel() {
-       var sel_ver = document.getElementById( "ver" );
-       var option  = "";
+function fillVersionSelection() {
+       var selection_version = document.getElementById( "version" );
+       var option        = "";
 
        // Fill the <select> element until all versions are used.
        for( var i = 0, j = SEL_VER.length; i < j; i = i + 2 ) {
@@ -262,7 +262,7 @@ function fillVerSel() {
                option.value = SEL_VER[ i ];
                // Assign the UI version.
                option.text  = SEL_VER[ i + 1 ];
-               sel_ver.appendChild( option );
+               selection_version.appendChild( option );
        }
 
        return;
@@ -272,33 +272,33 @@ function fillVerSel() {
  * Set value in the <select> element for OS (select box)
  * Depends on OS data from browser
  */
-function setOSSel() {
+function setOSSelection() {
        // Depending on $PLATFORM assign the platform string of the release 
matrix.
-       var sel_os = document.getElementById( "os" );
+       var selection_os = document.getElementById( "os" );
 
        // Set the recognized browser platform as default for the select box.
        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.
                if( SEL_OS[ i ] === PLATFORM ) {
-                       sel_os.selectedIndex = i / 3;
+                       selection_os.selectedIndex = i / 3;
                        break;
                }
        }
 
        // If no selected platform for was set in the select box because it was 
not recognized from browser data,
        // assign "Windows" as default.
-       if( sel_os.selectedIndex === 0 ) {
+       if( selection_os.selectedIndex === 0 ) {
                // Default: Assign "Windows".
                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.
                        if( SEL_OS[ i ] === "Win_x86_install" ) {
-                               sel_os.selectedIndex = i / 3;
+                               selection_os.selectedIndex = i / 3;
                                break;
                        }
                }
        }
 
-       PLATFORM_SEL = sel_os.value;
+       PLATFORM_SEL = selection_os.value;
        return PLATFORM_SEL;
 }
 
@@ -306,35 +306,35 @@ function setOSSel() {
  * Set value in the <select> element for language (select box)
  * Depends on language data from browser
  */
-function setLangSel() {
+function setLanguageSelection() {
        // Depending on $LANG_ISO assign the language position of the release 
matrix.
-       var sel_lang   = document.getElementById( "lang" );
-       var lang_found = false;
+       var selection_language = document.getElementById( "language" );
+       var language_found     = false;
 
        // Set the recognized browser language as default for the select box.
        for( var i = 0, j = SEL_LANG.length; i < j; i = i + 2 ) {
                // If the language was found, assign the found index to the 
select box.
                if( SEL_LANG[ i ] === LANG_ISO ) {
-                       sel_lang.selectedIndex = i / 2;
-                       lang_found = true;
+                       selection_language.selectedIndex = i / 2;
+                       language_found = true;
                        break;
                }
        }
 
        // If no selected language was set in the select box because it was not 
recognized from browser data,
        // assign "en-US" as default.
-       if( ! lang_found ) {
+       if( ! language_found ) {
                // Default: Assign "en-US".
                for( var i = 0, j = SEL_LANG.length; i < j; i = i + 2 ) {
                        // If the language was found, assign the found index to 
the select box.
                        if( SEL_LANG[ i ] === "en-US" ) {
-                               sel_lang.selectedIndex = i / 2;
+                               selection_language.selectedIndex = i / 2;
                                break;
                        }
                }
        }
 
-       LANG_SEL = sel_lang.value;
+       LANG_SEL = selection_language.value;
        return LANG_SEL;
 }
 
@@ -342,33 +342,33 @@ function setLangSel() {
  * Set value in the <select> element for version (select box)
  * Depends on nothing
  */
-function setVerSel() {
+function setVersionSelection() {
        // Depending on $VERSION assign the version.
-       var sel_ver = document.getElementById( "ver" );
+       var selection_version = document.getElementById( "version" );
 
        // Set the value of $VERSION as default for the select box.
        for( var i = 0, j = SEL_VER.length; i < j; i = i + 2 ) {
                // If the version was found, assign the found index to the 
select box.
                if( SEL_VER[ i ] === VERSION ) {
-                       sel_ver.selectedIndex = i/2;
+                       selection_version.selectedIndex = i/2;
                        break;
                }
        }
 
        // If no version was set as global variable,
        // assign the most recent version as default.
-       if( sel_ver.selectedIndex === 0 ) {
+       if( selection_version.selectedIndex === 0 ) {
                // Default: Assign "4.1.0".
                for( var i = 0; i < SEL_VER.length; i = i + 2 ) {
                        // If the version was found, assign the found index to 
the select box.
                        if( SEL_VER[ i ] === "4.1.0" ) {
-                               sel_ver.selectedIndex = i / 2;
+                               selection_version.selectedIndex = i / 2;
                                break;
                        }
                }
        }
 
-       VERSION_SEL = sel_ver.value;
+       VERSION_SEL = selection_version.value;
        return VERSION_SEL;
 }
 
@@ -376,7 +376,7 @@ function setVerSel() {
  * Get values from the <select> element for OS (select box)
  * Depends on chosen OS
  */
-function getOSSel() {
+function getOSSelection() {
        var os_value = 
document.download.os.options[document.download.os.selectedIndex].value;
 
        // Search through the <select> element until the chosen OS is found.
@@ -397,13 +397,13 @@ function getOSSel() {
  * Get values from the <select> element for language (select box)
  * Depends on chosen language
  */
-function getLangSel() {
-       var lang_value = 
document.download.lang.options[document.download.lang.selectedIndex].value;
+function getLanguageSelection() {
+       var language_value = 
document.download.language.options[document.download.language.selectedIndex].value;
 
        // Search through the <select> element until the chosen language is 
found.
        for( var i = 0, j = SEL_LANG.length; i < j; i = i + 2 ) {
-               if( SEL_LANG[ i ] === lang_value ) {
-                       LANG_SEL = lang_value;
+               if( SEL_LANG[ i ] === language_value ) {
+                       LANG_SEL = language_value;
                        break;
                }
        }
@@ -416,13 +416,13 @@ function getLangSel() {
  * Get values from the <select> element for version (select box)
  * Depends on chosen version
  */
-function getVerSel() {
-       var ver_value = 
document.download.ver.options[document.download.ver.selectedIndex].value;
+function getVersionSelection() {
+       var version_value = 
document.download.version.options[document.download.version.selectedIndex].value;
 
        // Search through the <select> element until the chosen version is 
found.
        for( var i = 0, j = SEL_VER.length; i < j; i = i + 2 ) {
-               if( SEL_VER[ i ] === ver_value ) {
-                       VERSION_SEL = ver_value;
+               if( SEL_VER[ i ] === version_value ) {
+                       VERSION_SEL = version_value;
                        break;
                }
        }
@@ -431,18 +431,16 @@ function getVerSel() {
 }
 
 /*
- * Reset CSS style for all elements with ID to make them invisible
+ * Hide CSS style for all elements with ID to make them invisible
  */
-function resetElements() {
+function hideElements() {
        // Change CSS styles for all elements with ID in the green and 
sub-green colored boxes.
        // Emtpy the values for all elements, make them invisible.
-       for( var i = 0, j = element_ids_sub_box.length; i < j; i++ ) {
+       for( var i = 0, j = element_ids_sub_box.length; i < j; i++ )
                document.getElementById( element_ids_sub_box[ i ] 
).style.display = "none";
-       }
 
-       for( var i = 0, j = element_ids_links.length; i < j; i++ ) {
+       for( var i = 0, j = element_ids_links.length; i < j; i++ )
                document.getElementById( element_ids_links[ i ] ).style.display 
  = "none";
-       }
 
        return;
 }
@@ -466,8 +464,8 @@ function showWindow( target_link ) {
 function showErrorMessage( error_text ) {
        // The chosen items from select boxes lead to no download link, show an 
error message about reason and alternative.
 
-       // In general, reset the data for link, text and title of all elements.
-       resetElements();
+       // In general, hide the data for link, text and title of all elements.
+       hideElements();
 
        // Now set again the values for all elements that should be shown with 
changed data.
        document.getElementById( "dl_f_link"    ).style.display  = "inline";
@@ -490,13 +488,13 @@ function showErrorMessage( error_text ) 
        document.getElementById( "dl_err"       ).style.cursor   = "default";
        document.getElementById( "dl_err"       ).style.display  = 
"inline-block";
 
-       document.getElementById( "sub_box"      ).className      = 
"sub-green-sel_error";
+       document.getElementById( "sub_box"      ).className      = 
"sub-green_error";
        document.getElementById( "sub_box"      ).style.display  = "block";
 
        // Delete previously set string to get the possibility back to choose a 
different platform
        // and then to assemble a new download link.
        UI_PLATFORM_NO_SUP = "";
-       SUB_BOX            = true;
+       SHOW_SUB_BOX       = true;
        ERROR              = true;
        return ERROR;
 }
@@ -506,7 +504,7 @@ function showErrorMessage( error_text ) 
  * Depends on array-list of "languages.js"
  * Depends on language and array-list of "release_matrix.js"
  */
-function isLangSupported() {
+function isLanguageSupported() {
        // Check the flag in "release_matrix.js", 'y' -> provide download link, 
'n' -> redirect to alternative webpage.
 
        if( VERSION_SEL === undefined || VERSION_SEL === "" )
@@ -537,18 +535,18 @@ function isLangSupported() {
 }
 
 /*
- * Check links that should be assembled in getLinkSel() for expections that do 
not lead to real download links
+ * Check links that should be assembled in getLinkSelection() for expections 
that do not lead to real download links
  * Depends on chosen OS, language and version
  */
-function checkLinkExceptions() {
+function checkForLinkExceptions() {
        // If recognized platform is not Windows, Linux or Mac, show the 
none-availability to the user.
 
        var error_text = "";
-       SUB_BOX        = true;
+       SHOW_SUB_BOX   = true;
        ERROR          = false;
 
        // If language is not supported, show the none-availability to the user.
-       if( ! isLangSupported() ) {
+       if( ! isLanguageSupported() ) {
                // Show an error message that the chosen items do not lead to a 
download.
                error_text = "<b>" + l10n_download_error_problem_text + "</b>" 
+ l10n_download_error_aoo_text + VERSION_SEL
                             + l10n_download_error_not_available_for_text + 
"<b>" + RELEASE_LANG[ 1 ] + " ("
@@ -557,9 +555,6 @@ function checkLinkExceptions() {
                             + l10n_download_error_please_select_4_text;
 
                showErrorMessage( error_text );
-       } else {
-               // If language is supported, assemble the filenames and text 
for download and checksums.
-               // Go on in "getLinkSel().
        }
 
        if( UI_PLATFORM_NO_SUP !== "" ) {
@@ -596,8 +591,8 @@ function checkLinkExceptions() {
 
        // If version is '3.4.1', create a download link that leads to the 
"other-3.4.1.html" webpage.
        if( VERSION_SEL === "3.4.1" ) {
-               // In general, reset the data for link, text and title of all 
elements.
-               resetElements();
+               // In general, hide the data for link, text and title of all 
elements.
+               hideElements();
 
                // Set the values for the single download text button.
                document.getElementById( "dl_f_link"    ).href          = 
l10n_download_aoo341_link;
@@ -608,12 +603,13 @@ function checkLinkExceptions() {
                document.getElementById( "dl_lp_link"   ).style.display = 
"none";
                document.getElementById( "sub_box"      ).style.display = 
"none";
 
-               SUB_BOX = false;
+               SHOW_SUB_BOX = false;
        }
+
        // If platform is 'other', create a download link that leads to the 
Porting webpage.
        if( PLATFORM_SEL === "other" ) {
-               // In general, reset the data for link, text and title of all 
elements.
-               resetElements();
+               // In general, hide the data for link, text and title of all 
elements.
+               hideElements();
 
                // Set the values for the single download text button.
                document.getElementById( "dl_f_link"    ).href          = 
l10n_download_porting_link;
@@ -624,13 +620,13 @@ function checkLinkExceptions() {
                document.getElementById( "dl_lp_link"   ).style.display = 
"none";
                document.getElementById( "sub_box"      ).style.display = 
"none";
 
-               SUB_BOX = false;
+               SHOW_SUB_BOX = false;
        }
 
        // If version is 'older', create a download link that leads to the 
archive webpage.
        if( VERSION_SEL === "older" ) {
-               // In general, reset the data for link, text and title of all 
elements.
-               resetElements();
+               // In general, hide the data for link, text and title of all 
elements.
+               hideElements();
 
                // Set the values for the single download text button.
                document.getElementById( "dl_f_link"    ).href          = 
l10n_download_archive_link;
@@ -641,7 +637,7 @@ function checkLinkExceptions() {
                document.getElementById( "dl_lp_link"   ).style.display = 
"none";
                document.getElementById( "sub_box"      ).style.display = 
"none";
 
-               SUB_BOX = false;
+               SHOW_SUB_BOX = false;
        }
 
        return ERROR;
@@ -651,23 +647,23 @@ function checkLinkExceptions() {
  * Get link to mirror system for download file and checksum file
  * Depends on chosen OS, language and version
  */
-function getLinkSel() {
+function getLinkSelection() {
        // Reset all variables that could have been set until now.
-       initVars( 0 );
+       initVariables( 0 );
 
        // Get the selected data from the select boxes.
-       getOSSel();
-       getLangSel();
-       getVerSel();
+       getOSSelection();
+       getLanguageSelection();
+       getVersionSelection();
 
        // First check for expections that do not lead to real download links.
-       checkLinkExceptions();
+       checkForLinkExceptions();
 
        // If the selected options lead to no download URL, should the sub-box 
shown anyway?
-       // Yes when SUB_BOX = "true" and ERROR = "false".
-       if( SUB_BOX && ! ERROR ) {
+       // Yes when SHOW_SUB_BOX = "true" and ERROR = "false".
+       if( SHOW_SUB_BOX && ! ERROR ) {
                // Assemble the filenames and text for download and checksums.
-               getReleaseMatrixPos();
+               getReleaseMatrixPosition();
                getFileData( VERSION_SEL );
 
                SOURCEFORGE_BASE_URL = SOURCEFORGE + VERSION_SEL + "/binaries/";
@@ -686,7 +682,7 @@ function getLinkSel() {
                LINK_CHK_MD5_LP      = ASF_ARC_BASE_URL  + "/binaries/"   + 
LANG_SEL + "/" + FILENAME_LP   + ".md5";
                LINK_CHK_SHA256_LP   = ASF_ARC_BASE_URL  + "/binaries/"   + 
LANG_SEL + "/" + FILENAME_LP   + ".sha256";
 
-               SUB_BOX              = true;
+               SHOW_SUB_BOX         = true;
                ERROR                = false;
 
                // Set the values for both download text buttons and set the 
focus to the "full install".
@@ -756,8 +752,8 @@ function getLinkSel() {
                document.getElementById( "dl_rpt"           ).innerHTML = 
l10n_download_report_text;
                document.getElementById( "dl_rpt"           ).title     = 
l10n_download_report_title;
 
-               // Reset the CSS styles for the elements in the sub-green 
colored boxes.
-               document.getElementById( "sub_box"    ).className              
= "sub-green-sel";
+               // Hide the CSS styles for the elements in the sub-green 
colored boxes.
+               document.getElementById( "sub_box"          ).className        
= "sub-green";
                document.getElementById( "dl_err_img"       ).style.display    
= "none";
                document.getElementById( "dl_err"           ).style.display    
= "none";
 
@@ -770,8 +766,8 @@ function getLinkSel() {
 
                // Set the cursor style for elements with links to pointer and 
make the elements visible.
                for( var i = 0, j = element_ids_links.length; i < j; i++ ) {
-                       document.getElementById( element_ids_links[ i ] 
).style.display     = "inline";
-                       document.getElementById( element_ids_links[ i ] 
).style.cursor      = "pointer";
+                       document.getElementById( element_ids_links[ i ] 
).style.display   = "inline";
+                       document.getElementById( element_ids_links[ i ] 
).style.cursor    = "pointer";
                }
 
                // Set the cursor style for the 3 links with icon to a help 
sign.
@@ -963,7 +959,7 @@ function getPlatform() {
                            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)";
+                           ua.indexOf( "10_3"          ) !== -1 ) {    
UI_PLATFORM     = "Mac OS X (Version <= 10.6)";
                                                                        
PLATFORM        = "mac32";
                        }
                } 
@@ -982,7 +978,7 @@ function getPlatform() {
  * Get positions of platform in release matrix
  * Depends on platform and array-list of "release_matrix.js"
  */
-function getReleaseMatrixPos() {
+function getReleaseMatrixPosition() {
        // Depending on $PLATFORM, assign the platform position from the 
release matrix.
        switch( PLATFORM ) {
                case "lnx64d":
@@ -1040,16 +1036,16 @@ function getReleaseMatrixPos() {
  * Get file name for download file
  * Depends on version and array-list of "release_matrix.js"
  */
-function getFileData( ver ) {
+function getFileData( version ) {
        // Depending on $ver, a different release matrix has to be used to 
assemble the download filenames.
-       switch( ver ) {
+       switch( version ) {
                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 ];
 
                        // 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;
+                       FILENAME_FULL    = "Apache_OpenOffice_" + version + "_" 
+ PLATFORM_FULL + "_" + LANG_ISO + EXTENSION;
+                       FILENAME_LP      = "Apache_OpenOffice_" + version + "_" 
+ 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 ][ 1 ];
@@ -1069,8 +1065,8 @@ function getFileData( ver ) {
                        RELEASE_PLATFORM = release_401[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ];
 
                        // 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;
+                       FILENAME_FULL    = "Apache_OpenOffice_" + version + "_" 
+ PLATFORM_FULL + "_" + LANG_ISO + EXTENSION;
+                       FILENAME_LP      = "Apache_OpenOffice_" + version + "_" 
+ 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 ][ 1 ];
@@ -1090,8 +1086,8 @@ function getFileData( ver ) {
                        RELEASE_PLATFORM = release_400[ LANG_ISO ][ 
RELEASE_PLATFORM_POS_FULL ];
 
                        // 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;
+                       FILENAME_FULL    = "Apache_OpenOffice_" + version + "_" 
+ PLATFORM_FULL + "_" + LANG_ISO + EXTENSION;
+                       FILENAME_LP      = "Apache_OpenOffice_" + version + "_" 
+ 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 ][ 1 ];
@@ -1109,8 +1105,8 @@ function getFileData( ver ) {
                default:
                        FILENAME_FULL    = "";
                        FILENAME_LP      = "";
-                       FILESIZE_FULL    = 0;
-                       FILESIZE_LP      = 0;
+                       FILESIZE_FULL    = -1;
+                       FILESIZE_LP      = -1;
                        REL_TEXT         = 
l10n_download_rel_info_milestone_text + "? | "
                                         + l10n_download_rel_info_buildid_text  
 + "? | "
                                         + l10n_download_rel_info_svn_text      
 + "? | "
@@ -1134,7 +1130,7 @@ function openItem( itemid, uri ) {
 /*
  * Output values of variables for debugging
  */
-function alertDbg( location ) {
+function debug( location ) {
        if( location === "" )
                location = "No location named!";
 
@@ -1169,7 +1165,7 @@ function alertDbg( location ) {
        + "LINK_CHK_ASC_LP: "                   + "\t\t\t\t\t"          + 
LINK_CHK_ASC_LP                       + "\n"
        + "LINK_CHK_MD5_LP: "                   + "\t\t\t\t\t"          + 
LINK_CHK_MD5_LP                       + "\n"
        + "LINK_CHK_SHA256_LP: "                + "\t\t\t\t"            + 
LINK_CHK_SHA256_LP                    + "\n"
-       + "SUB_BOX: "                           + "\t\t\t\t\t\t"        + 
SUB_BOX                               + "\n"
+       + "SHOW_SUB_BOX: "                      + "\t\t\t\t\t"          + 
SHOW_SUB_BOX                          + "\n"
        + "ERROR: "                             + "\t\t\t\t\t\t\t"      + ERROR 
                                + "\n"
        + "" );
 


Reply via email to