openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r899782 - in /websites/staging/ooo-site/trunk: cgi-bin/ content/ content/download/test/download.js
Date Sun, 02 Mar 2014 23:05:33 GMT
Author: buildbot
Date: Sun Mar  2 23:05:33 2014
New Revision: 899782

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 Sun Mar  2 23:05:33 2014
@@ -1 +1 @@
-1573394
+1573400

Propchange: websites/staging/ooo-site/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sun Mar  2 23:05:33 2014
@@ -1 +1 @@
-1573394
+1573400

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 Sun Mar  2 23:05:33
2014
@@ -125,9 +125,10 @@ function getLink( rel_mode ) {
 	var chk_link = "";
 
 	getLanguage();
-	hasMirrorLink();
 	getPlatform();
-	getFilesize( rel_mode );
+	if ( hasMirrorLink() ) {
+		getFilesize( rel_mode );
+	}
 
 	if ( NL_LANGUAGE == "" )
 		NL_LANGUAGE = LANG_ISO;
@@ -138,116 +139,180 @@ function getLink( rel_mode ) {
 		version = version.split( "_" )[0];
 	*/
 
+	// If language is supported, then provide a download link. 
 	if ( hasMirrorLink() ) {
-		// If platform is too old, then provide a general download link to the archive.
-		if ( OLD_PLATFORM ) {
-			if ( rel_mode == 0 ) {
-				// Release mode
-				LINK	= "http://archive.apache.org/dist/openoffice/";
+		// Release mode
+		if ( rel_mode == 0 ) {
+			// 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 + NL_LANGUAGE + EXTENSION;
+					LINK		= SOURCEFORGE_PREVIOUS_URL + NL_LANGUAGE + "/" + FILENAME;
+					LINK		= LINK + "/download";
+
+					chk_link	= APACHE_DIST_PREVIOUS_URL + "/binaries/" + NL_LANGUAGE + "/";
+					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/";
 
 				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/";
-			} else {
-				// Beta release mode
-			}
-
-			if ( UI_PLATFORM == "Mac OS X (10.6 or older)" ) {
-				// If platform is Mac OS X <=10.6, then provide a download link with previous AOO
version.
 
-				if ( rel_mode == 0 ) {
-				  // Release mode
-				  FILENAME	= "Apache_OpenOffice_" + PRE_VERSION + "_" + URL_PLATFORM + "_";
-				  FILENAME	= FILENAME + NL_LANGUAGE + EXTENSION;
-				  LINK		= SOURCEFORGE_PREVIOUS_URL + NL_LANGUAGE + "/" + FILENAME + "/download";
-
-				  chk_link	= APACHE_DIST_PREVIOUS_URL + "/binaries/" + NL_LANGUAGE + "/" + 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";
-				} else {
-				  // Beta release mode
-				  LINK		= "http://www.openoffice.org/download/all_beta.html";
-				}
+				SOURCEFORGE	= false;
+				OTHER		= true;
+				ARCHIVE		= false;
+				ERROR		= true;
+				return LINK;
 			}
-
-			ARCHIVE	= true;
-			ERROR	= true;
-			return LINK;
-		}
-
-		if ( URL_PLATFORM == "" ) {
 			// If no platform was recognized, then provide a general download link to the "other.html"
webpage.
-			if ( UI_PLATFORM == "" )
-				UI_PLATFORM = "unknown platform/OS";
+			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";
 
-			if ( rel_mode == 0 ) {
-				// Release mode
-				LINK	= "http://www.openoffice.org/download/other.html";
-			} else {
-				// Beta release mode
-				LINK	= "http://www.openoffice.org/download/all_beta.html";
+				SOURCEFORGE	= false;
+				OTHER		= true;
+				ARCHIVE		= false;
+				ERROR		= true;
+				return LINK;
 			}
-			OTHER	= true;
-			ERROR	= true;
-			return LINK;
-		} else {
+
 			// If platform was recognized, assemble the filenames for download and checksums
 
 			// FILENAME	= "Apache_OpenOffice_" + VERSION + "_" + URL_PLATFORM + "_" + NL_LANGUAGE;
 			// FILENAME	= FILENAME + EXTENSION;
 
-			if ( rel_mode == 0 ) {
-				// Release mode
-				// Assign the file name (column 3) from the release matrix of language and platform
-				FILENAME	= release_matrix[ LANG_ISO ][ RELEASE_MATRIX_PLATFORM_POS ][ 3 ];
-
-				// LINK	= SOURCEFORGE_BASE_URL + NL_LANGUAGE + "/Apache_OpenOffice_" + VERSION + "_";
-				// LINK	= LINK + URL_PLATFORM + "_" + NL_LANGUAGE + EXTENSION + "/download";
-				LINK		= SOURCEFORGE_BASE_URL + NL_LANGUAGE + "/" + FILENAME + "/download";
-
-				// chk_link	= APACHE_DIST_BASE_URL + "/binaries/" + NL_LANGUAGE + "/Apache_OpenOffice_";
-				// chk_link	= chk_link + VERSION + "_" + URL_PLATFORM + "_" + NL_LANGUAGE + EXTENSION;
-				chk_link	= APACHE_DIST_BASE_URL + "/binaries/" + NL_LANGUAGE + "/" + FILENAME;
-			} else {
-				// Beta release mode
-				// Assign the file name (column 3) from the release matrix of language and platform
-				FILENAME	= release_matrix_beta[ LANG_ISO ][ RELEASE_MATRIX_PLATFORM_POS ][ 3 ];
-
-				// LINK	= SOURCEFORGE_BASE_URL + NL_LANGUAGE + "/Apache_OpenOffice_" + VERSION + "_";
-				// LINK	= LINK + URL_PLATFORM + "_" + NL_LANGUAGE + EXTENSION + "/download";
-				LINK		= SOURCEFORGE_BASE_URL_BETA + NL_LANGUAGE + "/" + FILENAME + "/download";
-
-				// chk_link	= APACHE_DIST_BASE_URL + "/binaries/" + NL_LANGUAGE + "/Apache_OpenOffice_";
-				// chk_link	= chk_link + VERSION + "_" + URL_PLATFORM + "_" + NL_LANGUAGE + EXTENSION;
-				chk_link	= APACHE_DIST_BASE_URL_BETA + "/binaries/" + NL_LANGUAGE + "/" + FILENAME;
-			}
+			// Assign the file name (column 3) from the release matrix of language and platform
+			FILENAME	= release_matrix[ LANG_ISO ][ RELEASE_MATRIX_PLATFORM_POS ][ 3 ];
+
+			// LINK	= SOURCEFORGE_BASE_URL + NL_LANGUAGE + "/Apache_OpenOffice_" + VERSION + "_";
+			// LINK	= LINK + URL_PLATFORM + "_" + NL_LANGUAGE + EXTENSION + "/download";
+			LINK		= SOURCEFORGE_BASE_URL + NL_LANGUAGE + "/" + FILENAME + "/download";
+
+			// chk_link	= APACHE_DIST_BASE_URL + "/binaries/" + NL_LANGUAGE + "/Apache_OpenOffice_";
+			// chk_link	= chk_link + VERSION + "_" + URL_PLATFORM + "_" + NL_LANGUAGE + EXTENSION;
+			chk_link	= APACHE_DIST_BASE_URL + "/binaries/" + NL_LANGUAGE + "/" + 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	= true;
-		}
- 		return LINK;
 
-		/*
-		} else {
+			/*
 			// Used for debugging
 			LINK		= PEOPLE_BASE_URL + "/binaries/" + NL_LANGUAGE + "/Apache_OpenOffice_";
 			LINK		= LINK + "/Apache_OpenOffice_" + "_" + NL_LANGUAGE + EXTENSION;
 			chk_link	= PEOPLE_BASE_URL + "/binaries/" + NL_LANGUAGE + "/Apache_OpenOffice_" + VERSION;
 			chk_link	= chk_link + "_" + URL_PLATFORM + "_" + NL_LANGUAGE + EXTENSION;
+			*/
+
 			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 + NL_LANGUAGE + EXTENSION;
+					LINK		= SOURCEFORGE_PREVIOUS_URL + NL_LANGUAGE + "/" + FILENAME;
+					LINK		= LINK + "/download";
+
+					chk_link	= APACHE_DIST_PREVIOUS_URL + "/binaries/" + NL_LANGUAGE + "/";
+					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";
+
+				SOURCEFORGE	= false;
+				OTHER		= true;
+				ARCHIVE		= false;
+				ERROR		= true;
+				return LINK;
+			}
+			// Assign the file name (column 3) from the release matrix of language and platform
+			FILENAME	= release_matrix_beta[ LANG_ISO ][ RELEASE_MATRIX_PLATFORM_POS ][ 3 ];
+
+			// LINK	= SOURCEFORGE_BASE_URL_BETA + NL_LANGUAGE + "/Apache_OpenOffice_Beta_" + VERSION
+ "_";
+			// LINK	= LINK + URL_PLATFORM + "_" + NL_LANGUAGE + EXTENSION + "/download";
+			LINK		= SOURCEFORGE_BASE_URL_BETA + NL_LANGUAGE + "/" + FILENAME + "/download";
+
+			// chk_link	= APACHE_DIST_BASE_URL_BETA + "/binaries/" + NL_LANGUAGE;
+			// chk_link	= chk_link + "/Apache_OpenOffice_Beta_" + VERSION + "_" + URL_PLATFORM + "_";
+			// chk_link	= chk_link + NL_LANGUAGE + EXTENSION;
+			chk_link	= APACHE_DIST_BASE_URL_BETA + "/binaries/" + NL_LANGUAGE + "/" + 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";
 		}
-		return LINK;
-		 */
+		SOURCEFORGE	= true;
+		OTHER		= false;
+		ARCHIVE		= false;
+		ERROR		= false;
+ 		return LINK;
 	} else {
-		ERROR = true;
-		return false;
+		// Release mode
+		if ( rel_mode == 0 ) {
+			// If language is not supported, then provide the link from the Native Language (NL) group.
+			LINK	= LANG_ARRAY[ 4 ];
+		} else {
+			// Beta release mode
+			// If language is not supported, then provide the "all_beta.html" as download link.
+			LINK	= "http://www.openoffice.org/download/all_beta.html";
+		}
+		ERROR	= true;
+ 		return LINK;
 	}
 }
 
@@ -281,8 +346,7 @@ function getPlatform() {
 	}
 
 	if ( os ) {
-
-	  // Recognized but not supported platforms / OS, set $UI_PLATFORM to show it to the user
+	  // 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";
@@ -331,7 +395,7 @@ function getPlatform() {
 	  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 the $UI_PLATFORM variable is already filled, then something was recognized and no
more work is need.
 	  if ( UI_PLATFORM != "" )
 		return;
 
@@ -377,7 +441,7 @@ function getPlatform() {
 		}
 	  }
 
-	  // OS X 64-bit
+	  // Mac OS X?
 	  if ( os.indexOf( "mac"		) != -1 ) {	UI_PLATFORM	= "OS X 64-bit Intel (DMG)";
 								URL_PLATFORM	= "MacOS_x86_install";
 								EXTENSION	= ".dmg";



Mime
View raw message