openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r1858218 - /openoffice/ooo-site/trunk/content/download/download.js
Date Fri, 26 Apr 2019 17:50:53 GMT
Author: marcus
Date: Fri Apr 26 17:50:53 2019
New Revision: 1858218

URL: http://svn.apache.org/viewvc?rev=1858218&view=rev
Log:
Changed checksum links: Data for the current release needs to come from ASF Dist and only
for older releases the data can come from ASF Archive

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

Modified: openoffice/ooo-site/trunk/content/download/download.js
URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/download.js?rev=1858218&r1=1858217&r2=1858218&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/download.js (original)
+++ openoffice/ooo-site/trunk/content/download/download.js Fri Apr 26 17:50:53 2019
@@ -118,6 +118,7 @@ DL.initVariables = function( init_all )
 	DL.ASF_WIKI_URL			= "";	 // The base URL for all release notes on Apache Wiki.
 	DL.LINK_FULL			= "";	 // The complete download URL (full install).
 	DL.LINK_LP			= "";	 // The complete download URL (langpack).
+	DL.LINK_CHK_BASE_URL		= "";	 // The base URL for the checksum files.
 	DL.LINK_CHK_KEYS		= "";	 // The KEYS file as download URL.
 	DL.LINK_CHK_ASC_FULL		= "";	 // The ASC file as download URL (full install).
 	DL.LINK_CHK_SHA256_FULL		= "";	 // The SHA256 file as download URL (full install).
@@ -817,22 +818,31 @@ DL.getLinkSelection = function() {
 		DL.getReleaseMatrixPosition();
 		DL.getFileData();
 
-		DL.SF_BASE_URL		= DL.SF      + DL.VERSION_SEL + "/binaries/";
-		DL.ASF_ARC_BASE_URL     = DL.ASF_ARC + DL.VERSION_SEL;
+		// Assign the base links: Base link + version.
+		DL.SF_BASE_URL		= DL.SF       + DL.VERSION_SEL + "/binaries/";
+		DL.ASF_DIST_BASE_URL	= DL.ASF_DIST + DL.VERSION_SEL;
+		DL.ASF_ARC_BASE_URL	= DL.ASF_ARC  + DL.VERSION_SEL;
 
 		// Assign the download links: Base link + language + file name.
 		DL.LINK_FULL		= DL.SF_BASE_URL		     + DL.LANG_SEL + "/" + DL.FILENAME_FULL + "/download";
 		DL.LINK_LP		= DL.SF_BASE_URL		     + DL.LANG_SEL + "/" + DL.FILENAME_LP   + "/download";
 
+		// If the selected version is the current release, match the checksum files from ASF Dist,
otherwise from the ASF Archive.
+		if( DL.VERSION_SEL === DL.VERSION ) {
+			DL.LINK_CHK_BASE_URL = DL.ASF_DIST_BASE_URL;
+		} else {
+			DL.LINK_CHK_BASE_URL = DL.ASF_ARC_BASE_URL;
+		}
+
 		// Assign the checksum links: Base link + language + file name.
 		DL.LINK_CHK_KEYS	= DL.ASF_DIST + "KEYS";
-		DL.LINK_CHK_ASC_FULL    = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_FULL
+ ".asc";
-		DL.LINK_CHK_SHA256_FULL = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_FULL
+ ".sha256";
-		DL.LINK_CHK_SHA512_FULL = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_FULL
+ ".sha512";
-
-		DL.LINK_CHK_ASC_LP	= DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_LP
  + ".asc";
-		DL.LINK_CHK_SHA256_LP	= DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_LP
  + ".sha256";
-		DL.LINK_CHK_SHA512_LP	= DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_LP
  + ".sha512";
+		DL.LINK_CHK_ASC_FULL    = DL.LINK_CHK_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_FULL
+ ".asc";
+		DL.LINK_CHK_SHA256_FULL = DL.LINK_CHK_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_FULL
+ ".sha256";
+		DL.LINK_CHK_SHA512_FULL = DL.LINK_CHK_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_FULL
+ ".sha512";
+
+		DL.LINK_CHK_ASC_LP	= DL.LINK_CHK_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_LP
  + ".asc";
+		DL.LINK_CHK_SHA256_LP	= DL.LINK_CHK_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_LP
  + ".sha256";
+		DL.LINK_CHK_SHA512_LP	= DL.LINK_CHK_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_LP
  + ".sha512";
 
 		// Indicate that a download will successfull.
 		DL.SHOW_SUB_BOX		= true;
@@ -1370,6 +1380,7 @@ DL.debug = function( location ) {
 	+ "INSTALL_EXTENSION: "			+ "\t\t\t\t\t\t"	+ DL.INSTALL_EXTENSION		+ "\n"
 	+ "LINK_FULL: "				+ "\t\t\t\t\t\t"	+ DL.LINK_FULL			+ "\n"
 	+ "LINK_LP: "				+ "\t\t\t\t\t\t\t"	+ DL.LINK_LP			+ "\n"
+	+ "LINK_CHK_BASE_URL: "			+ "\t\t\t\t\t"		+ DL.LINK_CHK_BASE_URL		+ "\n"
 	+ "LINK_CHK_ASC_FULL: "			+ "\t\t\t\t\t"		+ DL.LINK_CHK_ASC_FULL		+ "\n"
 	+ "LINK_CHK_SHA256_FULL: "		+ "\t\t\t\t"		+ DL.LINK_CHK_SHA256_FULL	+ "\n"
 	+ "LINK_CHK_SHA512_FULL: "		+ "\t\t\t\t"		+ DL.LINK_CHK_SHA512_FULL	+ "\n"



Mime
View raw message