Author: marcus
Date: Sat Jun 14 07:50:03 2014
New Revision: 1602565

URL: http://svn.apache.org/r1602565
Log:
Re-worked the release mode definition

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=1602565&r1=1602564&r2=1602565&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/test/download.js (original)
+++ openoffice/ooo-site/trunk/content/download/test/download.js Sat Jun 14 
07:50:03 2014
@@ -29,7 +29,7 @@
 /*
  * Init function
  */
-function init( a ) {
+function init( mode ) {
        // Set global variables.
        initVars( 1 );
 
@@ -48,8 +48,10 @@ function init( a ) {
        setVerSel();
 
        
-       // Get release mode and analyze mode from "index.html" respective 
"analyze.html".
-       R_MODE = a;
+       // When release mode = 2, it is a beta release. Otherwise assume 
"stable release" as default.
+       if( mode === 2 )
+               R_MODE = mode;
+
        getLinkSel();
 
        return;
@@ -77,7 +79,7 @@ function initVars( init_all ) {
 
        // All global variables.
        if( init_all === 1 ) {
-               R_MODE                          = "";    // The release mode (1 
= stable release (default), 2 = beta release, etc.).
+               R_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.
@@ -645,10 +647,6 @@ function getLinkSel() {
        // Reset all variables that could have been set until now.
        initVars( 0 );
 
-       // If no mode was given, assume it is the release mode (stable release).
-       if( R_MODE === undefined )
-               R_MODE = 1;
-
        // Get the selected data from the select boxes.
        getOSSel();
        getLangSel();


Reply via email to