openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r903615 - in /websites/staging/ooo-site/trunk: cgi-bin/ content/ content/download/test/download.js
Date Tue, 25 Mar 2014 21:51:25 GMT
Author: buildbot
Date: Tue Mar 25 21:51:25 2014
New Revision: 903615

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 Tue Mar 25 21:51:25 2014
@@ -1 +1 @@
-1581543
+1581544

Propchange: websites/staging/ooo-site/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Mar 25 21:51:25 2014
@@ -1 +1 @@
-1581543
+1581544

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 Tue Mar 25 21:51:25
2014
@@ -2,9 +2,9 @@
  * Overview of all functions defined below
  * ---------------------------------------
  * function getLanguage   ()
- * function hasMirrorLink ()
- * function getLink       ()
- * function getPlatform   ()
+ * function hasMirrorLink ( rel_mode )
+ * function getLink       ( rel_mode )
+ * function getPlatform   ( rel_mode )
  * function openItem      ( itemid, uri )
  */
 
@@ -108,13 +108,42 @@ function getLanguage() {
  * Get flag for mirror link
  * Depends on array-list
  */
-function hasMirrorLink() {
-	// Check the flag in "languages.js", 'y' -> provide download link, 'n' -> redirect
to alternative webpage
+function hasMirrorLink( rel_mode ) {
+
+	if ( rel_mode == 0 ) {
+		// First check if the Beta release languages (not available as current stable release !)
are set in browser
+		if ( LANG_ISO == "bg" || LANG_ISO == "da" || LANG_ISO == "hi" || LANG_ISO == "nb" || LANG_ISO
== "th" ) {
+			SOURCEFORGE	= false;
+			OTHER		= true;
+			ARCHIVE		= false;
+			ERROR		= true;
+			return false;
+		}
+		// Check the flag in "languages.js", 'y' -> provide download link, 'n' -> redirect
to alternative webpage
+		if ( LANG_ARRAY[ 3 ] == 'y' ) {
+			return true;
+		} else {
+			ERROR = true;
+			return false;
+		}
+	} else {
+		// Beta release mode
+		// Check the flag in "languages.js", 'y' -> provide download link, 'n' -> redirect
to alternative webpage
+		if ( LANG_ARRAY[ 3 ] == 'y' ) {
+			return true;
+		} else {
+			ERROR = true;
+			return false;
+		}
+	}
+
+/*
 	if ( LANG_ARRAY[ 3 ] == 'y' )
 		return true;
 	else
 		ERROR = true;
 		return false;
+*/
 }
 
 /*
@@ -130,7 +159,16 @@ function getLink( rel_mode ) {
 
 	getLanguage();
 	getPlatform( rel_mode );
-	if ( hasMirrorLink() ) {
+/*
+	document.write ( "Language ISO: " + LANG_ISO + " - has MirrorLink( rel_mode )?: " + hasMirrorLink(
rel_mode )
+	+ "<br />"
+	+ "SourceForge: " + SOURCEFORGE + " - Other: " + OTHER + " - Archive: " + ARCHIVE
+	+ "<br />"
+	+ "UI_PLATFORM: " + UI_PLATFORM + " - URL_PLATFORM: " + URL_PLATFORM + " - EXTENSION: "
+ EXTENSION
+	+ "<br />"
+	+ "LINK: " + LINK );
+*/
+	if ( hasMirrorLink( rel_mode ) ) {
 		getFilesize( rel_mode );
 	}
 	/*
@@ -144,7 +182,7 @@ function getLink( rel_mode ) {
 	*/
 
 	// If language is supported, then provide a download link. 
-	if ( hasMirrorLink() ) {
+	if ( hasMirrorLink( rel_mode ) ) {
 		// Release mode
 		if ( rel_mode == 0 ) {
 			// If platform is too old, then provide a general download link to the archive.



Mime
View raw message