You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by bu...@apache.org on 2012/05/07 18:14:11 UTC
svn commit: r816353 - in /websites/staging/ooo-site/trunk: cgi-bin/ content/
content/download/download_new_dl.js
content/download/download_new_mirrorbrain.js
content/download/globalvars_new_dl.js content/download/languages_new_dl.js
Author: buildbot
Date: Mon May 7 16:14:11 2012
New Revision: 816353
Log:
Staging update by buildbot for openofficeorg
Added:
websites/staging/ooo-site/trunk/content/download/download_new_dl.js
websites/staging/ooo-site/trunk/content/download/download_new_mirrorbrain.js
websites/staging/ooo-site/trunk/content/download/globalvars_new_dl.js
websites/staging/ooo-site/trunk/content/download/languages_new_dl.js
Modified:
websites/staging/ooo-site/trunk/cgi-bin/ (props changed)
websites/staging/ooo-site/trunk/content/ (props changed)
Propchange: websites/staging/ooo-site/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon May 7 16:14:11 2012
@@ -1 +1 @@
-1335086
+1335089
Propchange: websites/staging/ooo-site/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon May 7 16:14:11 2012
@@ -1 +1 @@
-1335086
+1335089
Added: websites/staging/ooo-site/trunk/content/download/download_new_dl.js
==============================================================================
--- websites/staging/ooo-site/trunk/content/download/download_new_dl.js (added)
+++ websites/staging/ooo-site/trunk/content/download/download_new_dl.js Mon May 7 16:14:11 2012
@@ -0,0 +1,882 @@
+/*
+ * get mirror host
+ * depends on which mirror is ready to receive load
+ */
+
+function getMirrorHost() {
+ var mirrorHost = "";
+ var randVal = ( Math.random() * 100 );
+ var MIRROR_RATIO = MIRROR_RATIO_1;
+
+ /*document.write( "ASF is active: " + MIRROR_ASF_ACTIVE + "<br/>" );
+ document.write( "SF is active: " + MIRROR_SF_ACTIVE + "<br/>" );
+ document.write( "Mirror ratio: " + MIRROR_RATIO + " % <br/>" );
+ document.write( "Random value: " + randVal + "<br/><br/>" );*/
+
+ // Are Apache mirrors working?
+ if ( MIRROR_ASF_ACTIVE > 0 ) {
+ // If random value is lower than ratio
+ if ( randVal < MIRROR_RATIO ) {
+ mirrorHost = "Apache";
+ //document.write ("Apache wins <br/>");
+ return MIRROR_APACHE_URL;
+ }
+ }
+ // Are SourceForge mirrors working?
+ if ( MIRROR_SF_ACTIVE > 0 ) {
+ // If random value is higher than ratio
+ if ( randVal > MIRROR_RATIO ) {
+ mirrorHost = "SourceForge";
+ //document.write ("SourceForge wins <br />");
+ return MIRROR_SOURCEFORGE_URL;
+ }
+ }
+
+ document.write( "Regular download goes to: " + mirrorHost + "<br/>" );
+
+ // Defining fall back mirror host
+ if ( mirrorHost == "" ) {
+ // Are Apache mirrors working?
+ if ( MIRROR_ASF_ACTIVE > 0 ) {
+ mirrorHost = "Apache";
+ }
+
+ // Else are SourceForge mirrors working?
+ else if ( MIRROR_SF_ACTIVE > 0 ) {
+ mirrorHost = "SourceForge";
+ }
+
+ // None is working, we have a problem
+ else {
+ mirrorHost = "No mirror host active, what to do?";
+ }
+
+ //document.write( "Fall back download goes to: " + mirrorHost + "<br/>" );
+ //document.write( "<br/>" );
+ }
+
+ return mirrorHost;
+}
+
+function getMirrorHost_asf_sf_mb_percent() {
+ var mirrorHost = "";
+ var randVal = ( Math.random() * 100 );
+ var MIRROR_RATIO = MIRROR_RATIO_2;
+
+ /*document.write( "ASF is active: " + MIRROR_ASF_ACTIVE + "<br/>" );
+ document.write( "SF is active: " + MIRROR_SF_ACTIVE + "<br/>" );
+ document.write( "MB is active: " + MIRROR_MB_ACTIVE + "<br/>" );
+ document.write( "Mirror ratio: " + MIRROR_RATIO + " % <br/>" );
+ document.write( "Random value: " + randVal + "<br/><br/>" );*/
+
+ // Are Apache mirrors working?
+ if ( MIRROR_ASF_ACTIVE > 0 ) {
+ // If random value is lower than ratio
+ if ( randVal < MIRROR_RATIO ) {
+ mirrorHost = "Apache";
+ }
+ }
+ // Are SourceForge mirrors working?
+ if ( MIRROR_SF_ACTIVE > 0 ) {
+ // If random value is higher than ratio and lower than ratio * 2
+ if ( ( randVal > MIRROR_RATIO ) && ( randVal < ( MIRROR_RATIO * 2 ) ) ) {
+ mirrorHost = "SourceForge";
+ }
+ }
+
+ // Are MirrorBrain mirrors working?
+ if ( MIRROR_MB_ACTIVE > 0 ) {
+ // If random value is higher than ratio * 2
+ if ( randVal > ( MIRROR_RATIO * 2 ) ) {
+ mirrorHost = "MirrorBrain";
+ }
+ }
+
+ document.write( "Regular download goes to: " + mirrorHost + "<br/>" );
+
+ // Defining fall back mirror host
+ if ( mirrorHost == "" ) {
+ // Are Apache mirrors working?
+ if ( MIRROR_ASF_ACTIVE > 0 ) {
+ mirrorHost = "Apache";
+ }
+
+ // Else are SourceForge mirrors working?
+ else if ( MIRROR_SF_ACTIVE > 0 ) {
+ mirrorHost = "SourceForge";
+ }
+
+ // Else are MirrorBrain mirrors working?
+ else if ( MIRROR_MB_ACTIVE > 0 ) {
+ mirrorHost = "MirrorBrain";
+ }
+
+ // None is working, we have a problem
+ else {
+ mirrorHost = "None, what to do?";
+ }
+
+ //document.write( "Fall back download goes to: " + mirrorHost + "<br/>" );
+ //document.write( "<br/>" );
+ }
+
+ return mirrorHost;
+}
+
+function getMirrorHost_asf_sf_mb_weighted() {
+ var mirrorHost = "";
+ // get total weight of the weight array (here it is 6)
+ var weight = eval( MIRROR_HOSTS_WEIGHT.join( "+" ) );
+ // multiply the random numbe with the total weight and round it down
+ var randVal = Math.floor ( Math.random() * weight );
+ // Assign the random position of the weighted array
+ var mirrorHost = MIRROR_HOSTS_WEIGHTED [ randVal ];
+
+ /*document.write( "ASF is active: " + MIRROR_ASF_ACTIVE + "<br/>" );
+ document.write( "MB is active: " + MIRROR_MB_ACTIVE + "<br/>" );
+ document.write( "SF is active: " + MIRROR_SF_ACTIVE + "<br/>" );
+ document.write( "ASF weight: " + MIRROR_HOSTS_WEIGHT[ 0 ] + "<br/>" );
+ document.write( "MB weight: " + MIRROR_HOSTS_WEIGHT[ 1 ] + "<br/>" );
+ document.write( "SF weight: " + MIRROR_HOSTS_WEIGHT[ 2 ] + "<br/>" );
+ for ( i = 0; i < weight ; i++ )
+ document.write( "ASF weight: " + MIRROR_HOSTS_WEIGHTED[ i ] + "<br/>" );
+ document.write( "Total weight: " + weight + "<br/>" );
+ document.write( "Random value: " + randVal + "<br/>" );
+ document.write( "<br/>" );
+
+ document.write( "Regular download goes to: " + mirrorHost + "<br/>" );
+ */
+
+ // Defining fall back mirror host
+
+ // Is Apache down?
+ if ( ( MIRROR_ASF_ACTIVE < 1 ) && ( mirrorHost == "Apache" ) )
+ mirrorHost = "MirrorBrain";
+
+ // Is MirrorBrain down?
+ else if ( ( MIRROR_MB_ACTIVE < 1 ) && ( mirrorHost == "MirrorBrain" ) )
+ mirrorHost = "SourceForge";
+
+ // Is SourceForge down?
+ else if ( ( MIRROR_SF_ACTIVE < 1 ) && ( mirrorHost == "SourceForge" ) )
+ mirrorHost = "MirrorBrain";
+
+ // Is Apache and MirrorBrain down?
+ if ( ( MIRROR_ASF_ACTIVE < 1 ) && ( MIRROR_MB_ACTIVE < 1 ) )
+ mirrorHost = "SourceForge";
+
+ // Is Apache and SourceForge down?
+ else if ( ( MIRROR_ASF_ACTIVE < 1 ) && ( MIRROR_SF_ACTIVE < 1 ) )
+ mirrorHost = "MirrorBrain";
+
+ // Is MirrorBrain and SourceForge down?
+ else if ( ( MIRROR_MB_ACTIVE < 1 ) && ( MIRROR_SF_ACTIVE < 1 ) )
+ mirrorHost = "Apache";
+
+ // None is working, we have a problem
+ if ( ( MIRROR_ASF_ACTIVE < 1 ) && ( MIRROR_MB_ACTIVE < 1 )
+ && ( MIRROR_SF_ACTIVE < 1 ) )
+ mirrorHost = "None, what to do?";
+
+ //document.write( "Fall back download goes to: " + mirrorHost + "<br/>" );
+ //document.write( "<br/>" );
+
+ return mirrorHost;
+}
+
+function getMirrorHost_asf_sf_mb_weighted2() {
+ var mirrorHost = "";
+ var weight = MIRROR_ASF_WEIGHT + MIRROR_MB_WEIGHT + MIRROR_SF_WEIGHT;
+ var randVal = Math.random();
+/*
+ document.write( "ASF is active: " + MIRROR_ASF_ACTIVE + "<br/>" );
+ document.write( "MB is active: " + MIRROR_MB_ACTIVE + "<br/>" );
+ document.write( "SF is active: " + MIRROR_SF_ACTIVE + "<br/>" );
+ document.write( "ASF weight: " + MIRROR_ASF_WEIGHT + " ");
+ document.write( "with threshold: " + ( MIRROR_ASF_WEIGHT / weight ) + "<br/>" );
+ document.write( "MB weight: " + MIRROR_MB_WEIGHT + " ");
+ document.write( "with threshold: " + ( MIRROR_MB_WEIGHT / weight ) + "<br/>" );
+ document.write( "SF weight: " + MIRROR_SF_WEIGHT + " ");
+ document.write( "with threshold: " + ( MIRROR_SF_WEIGHT / weight ) + "<br/>" );
+ document.write( "Total weight: " + weight + "<br/>" );
+ document.write( "Random value: " + randVal + "<br/>" );
+ document.write( "<br/>" );
+ */
+
+ // Are Apache mirrors working?
+ if ( MIRROR_ASF_ACTIVE > 0 ) {
+ // If random value is lower than ASF weight divided by total weight
+ if ( randVal < ( MIRROR_ASF_WEIGHT / weight ) ) {
+ mirrorHost = "Apache";
+ }
+ }
+
+ // Are MirrorBrain mirrors working?
+ if ( MIRROR_MB_ACTIVE > 0 ) {
+ // If random value is lower than SF weight divided by the total weight
+ // and higher than ASF weight divided by the total weight
+ if ( ( randVal > ( MIRROR_ASF_WEIGHT / weight ) )
+ && ( randVal < ( MIRROR_SF_WEIGHT / weight ) ) ) {
+ mirrorHost = "MirrorBrain";
+ }
+ }
+
+ // Are SourceForge mirrors working?
+ if ( MIRROR_SF_ACTIVE > 0 ) {
+ // If random value is higher than MB weight divided by total weight
+ if ( randVal > ( MIRROR_MB_WEIGHT / weight ) ) {
+ mirrorHost = "SourceForge";
+ }
+ }
+
+ //document.write( "Regular download goes to: " + mirrorHost + "<br/>" );
+
+ // Defining fall back mirror host
+ if ( mirrorHost == "" ) {
+ // Are Apache mirrors working?
+ if ( MIRROR_ASF_ACTIVE > 0 ) {
+ mirrorHost = "Apache";
+
+ // Else are MirrorBrain mirrors working?
+ } else if ( MIRROR_MB_ACTIVE > 0 ) {
+ mirrorHost = "MirrorBrain";
+
+ // Else are SourceForge mirrors working?
+ } else if ( MIRROR_SF_ACTIVE > 0 ) {
+ mirrorHost = "SourceForge";
+
+ // None is working, we have a problem
+ } else {
+ mirrorHost = "None, what to do?";
+ }
+
+ //document.write( "Fall back download goes to: " + mirrorHost + "<br/>" );
+ //document.write( "<br/>" );
+ }
+
+ return mirrorHost;
+}
+//old download.js added here
+
+/*
+ * get array for language
+ */
+function getArray() {
+ if (navigator.language)
+ language = navigator.language;
+ else if (navigator.userLanguage)
+ language = navigator.userLanguage;
+ else if (navigator.systemLanguage)
+ language = navigator.systemLanguage;
+
+ // Convert "en" to "en-US" as well since en-US build is the canonical
+ // translation, and thus better tested.
+ if (language == "" || language == "null" || language == "en") language = "en-US";
+
+ // Konqueror uses '_' where other browsers use '-'.
+ if (language.indexOf("_") != -1) {
+ language = language.split("_").join("-");
+ }
+
+ language = language.toLowerCase();
+ var languageCode = language.split("-")[0];
+ var regionCode = language.split("-")[1];
+
+ var thisLanguageSet = languages[languageCode];
+ if ( thisLanguageSet == null ) {
+ // language code not found inside array
+ languageCode = "en";
+ regionCode = "us";
+ thisLanguageSet = languages[languageCode];
+ }
+
+ if ( regionCode != null ) {
+ // found additional region code
+ if (thisLanguageSet[regionCode] != null) {
+ // choose langCode-regionCode
+ thisLanguage = thisLanguageSet[regionCode];
+ } else {
+ // choose default
+ thisLanguage = thisLanguageSet["-"];
+ if ( languageCode == "en" ) {
+ // special case, default is en-US for en-XX
+ regionCode = "us";
+ thisLanguageSet = languages[languageCode];
+ thisLanguage = thisLanguageSet[regionCode];
+ }
+ }
+ } else {
+ // choose default for none given region code
+ thisLanguage = thisLanguageSet["-"];
+ };
+ return thisLanguage;
+}
+
+/*
+ * get language for user-language
+ */
+function getLanguage() {
+ var a = getArray();
+ return a[1];
+}
+
+/*
+ * get language for user-language in ISO format
+ */
+function getLanguageISO() {
+ if (navigator.language)
+ language = navigator.language;
+ else if (navigator.userLanguage)
+ language = navigator.userLanguage;
+ else if (navigator.systemLanguage)
+ language = navigator.systemLanguage;
+
+ // Convert "en" to "en-US" as well since en-US build is the canonical
+ // translation, and thus better tested.
+ if (language == "" || language == "null" || language == "en") language = "en-US";
+ if (language == "pt") language = "pt-PT";
+
+ // Konqueror uses '_' where other browsers use '-'.
+ if (language.indexOf("_") != -1) language = language.split("_").join("-");
+
+ language = language.toLowerCase();
+ var languageCode = language.split("-")[0];
+ var regionCode = language.split("-")[1];
+
+ var thisLanguageSet = languages[languageCode];
+ if ( thisLanguageSet == null ) {
+ return "en-US";
+ } else if ( regionCode != null ) {
+ if ( regionCode == "pt" && languageCode == "pt" ) {
+ // fix for Port. pt-PT downloads named only pt without region code!
+ return languageCode;
+ }
+ if (thisLanguageSet[regionCode] != null) {
+ // choose langCode-regionCode
+ return languageCode + "-" + regionCode.toUpperCase();
+ } else {
+ // choose default
+ if ( languageCode == "en" ) {
+ // special case, default is en-US for en-XX
+ return "en-US";
+ } else
+ return languageCode;
+ }
+ } else {
+ // choose default
+ return languageCode;
+ };
+}
+
+/*
+ * get flag for mirror link
+ * was old bouncer flag
+ * depends on array-list
+ */
+function hasMirrorLink() {
+ var a = getArray();
+ var platform = getPlatform();
+ var schema = SCHEMA;
+
+ //alert ("schema: -" + schema +"-");
+ if (schema == "aoo_incubating") {
+ platform = getPlatform(schema);
+ }
+
+ //alert ("Platform: -" + platform +"-");
+ /* first check for availability */
+ if ( platform == 'none') {
+ return false;
+ }
+
+ if ( a[4] == 'y' ) {
+ // special handling for MAC, links in combination with general flag a[4]
+ if ( platform.indexOf( "Mac" ) == -1 || a[5] == 'y' ) {
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ return false;
+ }
+}
+
+/*
+ * get link
+ * depends on array-list
+ */
+function getLink( version ) {
+ return bouncer_getLink( version );
+}
+
+/*
+ * get link
+ * depends on array-list
+ * notes: assumes DL files live in DL_URL+'/files'+['stable'|'localized']+pack name
+ * see mirrorbrain_getLink for details
+ * additional path following add here
+ */
+function getLink( version, mirror ) {
+ if ( null != mirror ) {
+ return bouncer_getLink( version, mirror, "old" );
+ }
+}
+
+/*
+ * get link
+ * depends on array-list and download-set nameschema
+ */
+function getLink( version, mirror, schema ) {
+ if ( null != mirror ) {
+ if ( mirror.indexOf( "bouncer" ) > -1 ) {
+ return bouncer_getLink( version );
+ } else if ( mirror.indexOf( "mirrorbrain" ) > -1 ) {
+ return mirrorbrain_getLink( version, schema );
+ } else if ( mirror.indexOf( "sourceforge" ) > -1 ) {
+ return sourceforge_getLink( version, schema );
+ } else if (mirror.indexOf( "apache") > -1) {
+ return apache_getLink (version, schema);
+ } else {
+ return bouncer_getLink( version );
+ }
+ }
+}
+/* getLink mods for new mirrors */
+
+function sourceforge_getLink(version, schema) {
+ var mirrorbrain_link = mirrorbrain_getLink(version, schema);
+ sf_link = mirrorbrain_link.replace(MIRROR_MIRRORBRAIN_URL, MIRROR_SOURCEFORGE_URL) + '/download';
+ return sf_link;
+}
+
+function apache_getLink(version, schema) {
+ var mirrorbrain_link = mirrorbrain_getLink(version, schema);
+ apache_link = mirrorbrain_link.replace(MIRROR_MIRRORBRAIN_URL, MIRROR_APACHE_REF) ;
+ return apache_link;
+}
+/*
+ * get platform of browser
+ * independant from mirror-system
+ */
+function getPlatform() {
+ if ( navigator.platform != null && String(navigator.platform) != "" ) {
+ if ( navigator.platform.indexOf( "Win32" ) != -1 ) {
+ return "Windows";
+ } else if ( navigator.platform.indexOf( "Win64" ) != -1 ) {
+ return "Windows";
+ } else if ( navigator.platform.indexOf( "Win" ) != -1 ) {
+ return "Windows";
+ } else if ( navigator.platform.indexOf( "Linux" ) != -1 ) {
+ if ( navigator.platform.indexOf( "64" ) != -1 ) {
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 ||
+ navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ return "Linux Debian 64-bit";
+ } else {
+ return "Linux 64-bit";
+ }
+ } else {
+ return "Linux 64-bit";
+ }
+ } else {
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 ||
+ navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ return "Linux Debian";
+ } else {
+ return "Linux";
+ }
+ } else {
+ return "Linux";
+ }
+ }
+ } else if ( navigator.platform.indexOf( "SunOS i86pc" ) != -1 ) {
+ return "Solaris x86";
+ } else if ( navigator.platform.indexOf( "SunOS sun4u" ) != -1 ) {
+ return "Solaris SPARC";
+ } else if ( navigator.platform.indexOf( "SunOS" ) != -1 ) {
+ return "Solaris SPARC";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "Intel" ) != -1 ) {
+ return "Mac OS Intel";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "PPC" ) != -1 ) {
+ return "Mac OS PPC";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 ) {
+ return "Mac OS Intel" ;
+ } else if ( navigator.platform.indexOf( "iPad" ) != -1 || navigator.platform.indexOf( "iPhone" ) != -1 ||
+ navigator.platform.indexOf( "iPod" ) != -1 ) {
+ // this code will redirect the iPad, iPhone and iPod entries
+ return "Mac OS Intel" ;
+ } else if ( navigator.platform.indexOf( "Series60" ) != -1 ) {
+ // this code will redirect the Series60 entries
+ return "Windows" ;
+ } else if ( navigator.platform.indexOf( "null" ) != -1 ) {
+ return "Windows" ;
+ } else {
+ // return platform name
+ return navigator.platform;
+ }
+ }
+ return "Windows";
+}
+
+/* for customizing platforms for various schemas/release */
+function getPlatform(schema) {
+ if (schema == "aoo_incubating") {
+ if ( navigator.platform != null && String(navigator.platform) != "" ) {
+ if ( navigator.platform.indexOf( "Win32" ) != -1 ) {
+ return "Windows";
+ } else if ( navigator.platform.indexOf( "Win64" ) != -1 ) {
+ return "Windows";
+ } else if ( navigator.platform.indexOf( "Win" ) != -1 ) {
+ return "Windows";
+ } else if ( navigator.platform.indexOf( "Linux" ) != -1 ) {
+ if ( navigator.platform.indexOf( "64" ) != -1 ) {
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 ||
+ navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ return "Linux Debian 64-bit";
+ } else {
+ return "Linux 64-bit";
+ }
+ } else {
+ return "Linux 64-bit";
+ }
+ } else {
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 ||
+ navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ return "Linux Debian";
+ } else {
+ return "Linux";
+ }
+ } else {
+ return "Linux";
+ }
+ }
+ } else if ( navigator.platform.indexOf( "SunOS i86pc" ) != -1 ) {
+ return "none";
+ } else if ( navigator.platform.indexOf( "SunOS sun4u" ) != -1 ) {
+ return "none";
+ } else if ( navigator.platform.indexOf( "SunOS" ) != -1 ) {
+ return "none";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "Intel" ) != -1 ) {
+ return "Mac OS Intel";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "PPC" ) != -1 ) {
+ return "none";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 ) {
+ return "Mac OS Intel" ;
+ } else if ( navigator.platform.indexOf( "iPad" ) != -1 || navigator.platform.indexOf( "iPhone" ) != -1 ||
+ navigator.platform.indexOf( "iPod" ) != -1 ) {
+ // this code will redirect the iPad, iPhone and iPod entries
+ return "Mac OS Intel" ;
+ } else if ( navigator.platform.indexOf( "Series60" ) != -1 ) {
+ // this code will redirect the Series60 entries
+ return "Windows" ;
+ } else if ( navigator.platform.indexOf( "null" ) != -1 ) {
+ return "Windows" ;
+ } else {
+ // return platform name
+ return navigator.platform;
+ }
+ } // null navigator platform
+ } // fall through if nothing else works
+ return "Windows";
+}
+
+/*
+ * get platform for bouncer-link
+ * must be changed
+ */
+function getPlatformForMirror() {
+ return bouncer_getPlatformForMirror();
+}
+
+/*
+ * deprecated
+ * must be changed
+ */
+function getPlatformForBouncer() {
+ return getPlatformForMirror();
+}
+
+/*
+ * get tupel for tracking
+ */
+function getTupel( href ) {
+ if ( href.indexOf( "?" ) > 0 && href.indexOf( MIRROR_BOUNCER_URL ) > -1 ) {
+ return bouncer_getTupel( href );
+ } else if ( href.indexOf( MIRROR_MIRRORBRAIN_URL + "files/" ) > -1 ) {
+ return mirrorbrain_getTupel( href );
+ }
+ return "";
+}
+
+/*
+ * get product name for tracking
+ */
+function getProduct( href ) {
+ var retVal = "";
+
+ if ( href.indexOf( "?" ) > 0 && href.indexOf( MIRROR_BOUNCER_URL ) > -1 ) {
+ return bouncer_getProduct( href );
+ } else if ( href.indexOf( MIRROR_MIRRORBRAIN_URL + "files/" ) > -1 ) {
+ return mirrorbrain_getProduct( href );
+ }
+ return retVal;
+}
+
+/*
+ * get language code for tracking
+ */
+function getLang( href ) {
+ var retVal = "";
+
+ if ( href.indexOf( "?" ) > 0 && href.indexOf( MIRROR_BOUNCER_URL ) > -1 ) {
+ return bouncer_getLang( href );
+ } else if ( href.indexOf( MIRROR_MIRRORBRAIN_URL + "files/" ) > -1 ) {
+ return mirrorbrain_getLang( href );
+ }
+ return retVal;
+}
+
+/*
+ * get os for tracking
+ */
+function getOS( href ) {
+ var retVal = "";
+
+ if ( href.indexOf( "?" ) > 0 && href.indexOf( MIRROR_BOUNCER_URL ) > -1 ) {
+ return bouncer_getOS( href );
+ } else if ( href.indexOf( MIRROR_MIRRORBRAIN_URL + "files/" ) > -1 ) {
+ return mirrorbrain_getOS( href );
+ }
+ return retVal;
+}
+
+/*
+ * get version for tracking
+ */
+function getVersion( href ) {
+ var retVal = "";
+
+ if ( href.indexOf( "?" ) > 0 && href.indexOf( MIRROR_BOUNCER_URL ) > -1 ) {
+ return bouncer_getVersion( href );
+ } else if ( href.indexOf( MIRROR_MIRRORBRAIN_URL + "files/" ) > -1 ) {
+ return mirrorbrain_getVersion( href );
+ }
+ return retVal;
+}
+
+/*
+ * this function is used on the "download.openoffice.org/other.html" website
+ */
+function writeJavaSelector() {
+ document.write( "<form action=\"\" method=\"\" name=\"downloadSettings\">" );
+ document.write( "<input type=\"checkbox\" onclick=\"updateHREFs()\" checked=\"checked\" name=\"cbIncludeJRE\" id=\"cbIncludeJRE\"> " );
+ //document.write( "<label for=\"cbIncludeJRE\">Include the JRE to the download (this option is not available for Linux 32/64-bit Debian and Mac OS).</label></input>" );
+ document.write( "Include the JRE to the download (switching is only available for Windows and Linux 32-bit RPM full installation sets).</input>" );
+ document.write( "<br/>" );
+ document.write( "</form>" );
+}
+
+/*
+ * this function is used on the "download.openoffice.org/all_rc.html" website
+ */
+function writeJavaSelectorRC() {
+ document.write( "<form action=\"\" method=\"\" name=\"downloadSettings\">" );
+ document.write( "<input type=\"checkbox\" onclick=\"updateHREFs()\" checked=\"checked\" name=\"cbIncludeJRE\" id=\"cbIncludeJRE\"> " );
+ //document.write( "<label for=\"cbIncludeJRE\">Include the JRE to the download (this option is not available for Linux 32/64-bit Debian and Mac OS).</label></input>" );
+ document.write( "Include the JRE to the download (switching is only available for Windows and Linux 32-bit RPM full installation sets).</input>" );
+ document.write( "<br/>" );
+ document.write( "</form>" );
+}
+
+function updateHREFs() {
+ var qabuildsul = document.getElementById("qabuilds");
+ var anchorsToMirror = document.getElementsByTagName("a");
+
+ if (document.downloadSettings.cbIncludeJRE.checked == false) {
+ for (var i = 0; i < anchorsToMirror.length; i++) {
+ if ( anchorsToMirror[i].href.indexOf( "os=linuxinteldeb" ) == -1
+ && anchorsToMirror[i].href.indexOf( "os=macosx" ) == -1
+ ) {
+ if ( anchorsToMirror[i].href.indexOf( "?" ) > 0 && anchorsToMirror[i].href.indexOf( MIRROR_BOUNCER_URL ) > -1 ) {
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("wjre&lang=","&lang=");
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("wjre&lang=","&lang=");
+ } else if ( anchorsToMirror[i].href.indexOf( MIRROR_MIRRORBRAIN_URL + "files/" ) > -1 ) {
+ if ( anchorsToMirror[i].href.indexOf( "_install-" ) > -1 ||
+ ( anchorsToMirror[i].href.indexOf( "_install_" ) > -1 &&
+ ( anchorsToMirror[i].href.indexOf( "_Linux_" ) > -1 || anchorsToMirror[i].href.indexOf( "_MacOS_" ) > -1 ||
+ anchorsToMirror[i].href.indexOf( "_Win_" ) > -1 ) ) ) {
+ // new schema
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("-wJRE_","_");
+ } else {
+ // old schema
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("install_wJRE_","install_");
+ }
+ } else {
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("wjre&lang=","&lang=");
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("wjre&lang=","&lang=");
+ }
+ }
+ if ( anchorsToMirror[i].href.indexOf( "_Linux_x86-64_install-rpm_" ) > -1 || anchorsToMirror[i].href.indexOf( "_Solaris_" ) > -1) {
+ // do not include Linux x86-64 RPM, Solaris in the JRE switching as only wJRE builds are available
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("_install-rpm_","_install-rpm-wJRE_");
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("_install_","_install-wJRE_");
+ }
+ if ( anchorsToMirror[i].href.indexOf( "OOo-SDK_" ) > -1 ) {
+ // do not include SDK in the JRE switching as only non-JRE builds are available
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("_install-wJRE_","_install_");
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("_install-rpm-wJRE_","_install-rpm_");
+ }
+ }
+ } else {
+ for (var i = 0; i < anchorsToMirror.length; i++) {
+ if ( anchorsToMirror[i].href.indexOf( "os=linuxinteldeb" ) == -1
+ && anchorsToMirror[i].href.indexOf( "os=macosx" ) == -1
+ ) {
+ if ( anchorsToMirror[i].href.indexOf( "?" ) > 0 && anchorsToMirror[i].href.indexOf( MIRROR_BOUNCER_URL ) > -1 ) {
+ // we cannot assume that it is always right, and in order to prevent wjrewjrewjre&... this (should) solve(s) it...
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("wjre&lang=","&lang=");
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("wjre&lang=","&lang=");
+ // and now we add them :)
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("&lang=","wjre&lang=");
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("&lang=","wjre&lang=");
+ } else if ( anchorsToMirror[i].href.indexOf( MIRROR_MIRRORBRAIN_URL + "files/" ) > -1 ) {
+ if ( anchorsToMirror[i].href.indexOf( "_install" ) > -1 &&
+ ( anchorsToMirror[i].href.indexOf( "_MacOS" ) > -1 || anchorsToMirror[i].href.indexOf( "_deb" ) > -1 ||
+ anchorsToMirror[i].href.indexOf( "_HPPA" ) > -1 || anchorsToMirror[i].href.indexOf( "_IA64" ) > -1 ||
+ anchorsToMirror[i].href.indexOf( "_PPC" ) > -1 || anchorsToMirror[i].href.indexOf( "_S390X" ) > -1 ||
+ anchorsToMirror[i].href.indexOf( "OOo-SDK_" ) > -1 ) ) {
+ // do nothing for MAC, _deb, Linux HPPA, IA64, PPC, S390X and OOo-SDK
+ } else if ( anchorsToMirror[i].href.indexOf( "_install-" ) > -1 || (
+ anchorsToMirror[i].href.indexOf( "_install_" ) > -1 && (
+ anchorsToMirror[i].href.indexOf( "_Linux_" ) > -1 || anchorsToMirror[i].href.indexOf( "_Win_" ) > -1 ||
+ anchorsToMirror[i].href.indexOf( "_Solaris_" ) > -1
+ )
+ ) ) {
+ // new schema
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("_install_","_install-wJRE_");
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("_install-rpm_","_install-rpm-wJRE_");
+ } else {
+ // old schema
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("install_wJRE_","install_");
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("install_","install_wJRE_");
+ }
+ } else {
+ // we cannot assume that it is always right, and in order to prevent wjrewjrewjre&... this (should) solve(s) it...
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("wjre&lang=","&lang=");
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("wjre&lang=","&lang=");
+ // and now we add them :)
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("&lang=","wjre&lang=");
+ anchorsToMirror[i].href = anchorsToMirror[i].href.replace("&lang=","wjre&lang=");
+ }
+ }
+ }
+ }
+}
+
+function continueToDownload( uri ) {
+ uri = uri.replace( MIRROR_BOUNCER_URL, "" );
+ // bonuscheck... noone gets hurt...
+ if (document.downloadSettings.cbIncludeJRE.checked == false) {
+ uri = uri.replace("wjre","");
+ }
+ document.location = "http://download.openoffice.org/contribute.html" + uri; //absolute to for use at other subdomains
+}
+
+function continueToDownloadTwo( uri ) {
+ uri = uri.replace("http://openoffice.bouncer.osuosl.org/","");
+ // bonuscheck... noone gets hurt...
+ if (document.downloadSettings.cbIncludeJRE.checked == false) {
+ uri = uri.replace("wjre","");
+ }
+ document.location = "http://download.openoffice.org/contribute.html" + uri;
+}
+
+function openItem( itemid, uri ) {
+ var thisDocument = document.getElementById("downloadextendedtext");
+ var thisDocument = document.getElementById(itemid);
+
+ if ( ( itemid=="optionitem1" || itemid=="optionitem5" || itemid=="optionitem6" || itemid=="optionitem7" || itemid=="optionitem8" ) && uri.indexOf( MIRROR_BOUNCER_URL ) > -1 ) {
+ uri = uri.replace( MIRROR_BOUNCER_URL + "?","");
+ uri = "http://download.openoffice.org/contribute.html?download=bouncer&" + escape( uri );
+ } else if ( ( itemid=="optionitem1" || itemid=="optionitem5" || itemid=="optionitem6" || itemid=="optionitem7" || itemid=="optionitem8" ) && uri.indexOf( MIRROR_MIRRORBRAIN_URL ) > -1 ) {
+ uri = uri.replace( MIRROR_MIRRORBRAIN_URL, "");
+ uri = "http://download.openoffice.org/contribute.html?download=mirrorbrain&" + escape( uri );
+ }
+ document.location = uri;
+ // start( uri );
+};
+
+function makeDownloadLIintoButtons() {
+ var downloadextendedtext = document.getElementById( "downloadextendedtext" );
+ var liItems = downloadextendedtext.getElementsByTagName("li");
+
+ for (var i = 0; i < liItems.length; i++) {
+ var liItemsAnchors = liItems[i].getElementsByTagName("a");
+ if (liItemsAnchors.length == 1) {
+ var hrefcontents = liItemsAnchors[0].href;
+ if (hrefcontents.search( "bouncer" ) > -1 || hrefcontents.search( MIRROR_MIRRORBRAIN_URL ) > -1) {
+ liItems[i].onclick = function () {
+ var myHref = this.getElementsByTagName("a")[0].href;
+ continueToDownload(myHref);
+ return false;
+ };
+ } else {
+ liItems[i].onclick = function () {
+ var myHref = this.getElementsByTagName("a")[0].href;
+ document.location = myHref;
+ return false;
+ };
+ }
+ liItems[i].style.cursor = "pointer";
+ }
+ }
+}
+
+function start( uri ) {
+ alert( 'Go to OpenOffice.org ' + uri );
+
+}
+function doLoad( uri ) {
+ // the timeout value should be the same as in the "refresh" meta-tag
+ setTimeout( "download('" + uri + "')", 2*1000 );
+}
+
+function download( uri ) {
+ // starting the download
+ window.location.href = uri;
+}
+
+function startDownload() {
+ var s = window.location.search;
+ i = s.indexOf( "download=" );
+ if ( i > -1 ) {
+ if ( s.indexOf( "download=bouncer" ) > -1 ) {
+ uri = unescape( s.split( "download=bouncer" )[1] );
+ uri = MIRROR_BOUNCER_URL + "?" + uri;
+ } else if ( s.indexOf( "download=mirrorbrain&" ) > -1 ) {
+ uri = unescape( s.split( "download=mirrorbrain&" )[1] );
+ uri = MIRROR_MIRRORBRAIN_URL + uri;
+ }
+ s_linkType = "d";
+ s_linkTrackVars = "events,products,eVar3,eVar8,prop19,prop20,prop21";
+ s_linkTrackEvents = "event7";
+ s_events = "event7";
+ s_eVar3 = "ooo";
+ s_linkName = "ooo:" + getTupel( uri );
+ s_products = "Downloaded Products;" + getProduct( uri ) + " Download";
+ s_eVar8 = getTupel( uri );
+ s_prop19 = getOS( uri );
+ s_prop20 = getLang( uri );
+ s_prop21 = getVersion( uri );
+ if ( uri != null ) {
+ document.write( "Starting download from <a onClick='s_lnk=s_co(this);s_gs(s_account);' href='" + uri + "'>" + uri + "</a>." );
+ doLoad( uri );
+ }
+ // document.location = uri;
+ return false;
+ }
+}
+
Added: websites/staging/ooo-site/trunk/content/download/download_new_mirrorbrain.js
==============================================================================
--- websites/staging/ooo-site/trunk/content/download/download_new_mirrorbrain.js (added)
+++ websites/staging/ooo-site/trunk/content/download/download_new_mirrorbrain.js Mon May 7 16:14:11 2012
@@ -0,0 +1,596 @@
+/*
+ * get link to mirror system
+ * depends on array-list
+ */
+function mirrorbrain_getLink( version ) {
+ return mirrorbrain_getLink( version, "old" );
+}
+
+/*
+ * get link to mirror system in combination with schema for download-set
+ * depends on array-list
+ */
+function mirrorbrain_getLink( version, schema ) {
+ var a = getArray();
+ var platform = getPlatform();
+ var link = null;
+
+ if (schema == "aoo_incubating") {
+ platform = getPlatform(schema);
+ }
+ // if we don't support platform, we should send them to other.html, ok, taken care of in hasMirrorLink()
+ // not the right place really but ???
+
+ if ( hasMirrorLink() ) {
+ // use mirror link
+ if ( version == VERSION ) {
+ link = MIRROR_MIRRORBRAIN_URL + "files/";
+ if ( getLanguageISO().indexOf( "en-US" ) > -1 ) {
+ link = link + "stable/" + version + "/";
+ } else {
+ link = link + "localized/" + getLanguageISO() + "/" + version + "/";
+ }
+ return link + mirrorbrain_getFileName( version, schema );
+ } else if ( version == OLD_VERSION ) {
+ link = MIRROR_MIRRORBRAIN_URL + "files/";
+ if ( getLanguageISO().indexOf( "en-US" ) > -1 ) {
+ link = link + "stable/" + version + "/";
+ } else {
+ link = link + "localized/" + getLanguageISO() + "/" + version + "/";
+ }
+ return link + mirrorbrain_getFileName( version, schema );
+ } else if ( version == RC_VERSION ) {
+ link = MIRROR_MIRRORBRAIN_URL + "files/extended/" + mirrorbrain_getVersionForDownloadFolder( version ) + "/";
+ return link + mirrorbrain_getFileName( version, schema );
+ } else if ( version == BETA_VERSION ) {
+ link = MIRROR_MIRRORBRAIN_URL + "files/extended/" + version + "/";
+ return link + mirrorbrain_getFileName( version, schema );
+ } else if ( version == DEV1_VERSION ) {
+ link = MIRROR_MIRRORBRAIN_URL + "files/extended/developer/" + version + "/";
+ return link + mirrorbrain_getFileName( version, schema );
+ } else if ( version == DEV2_VERSION ) {
+ link = MIRROR_MIRRORBRAIN_URL + "files/extended/developer/" + version + "/";
+ return link + mirrorbrain_getFileName( version, schema );
+ } else if ( version == DEVB_VERSION ) {
+ link = MIRROR_MIRRORBRAIN_URL + "files/extended/developer/" + version + "/";
+ return link + mirrorbrain_getFileName( version, schema );
+ } else if ( version == TEST_VERSION ) {
+ link = MIRROR_MIRRORBRAIN_URL + "files/";
+ if ( getLanguageISO().indexOf( "en-US" ) > -1 ) {
+ link = link + "stable/" + version + "/";
+ } else {
+ link = link + "localized/" + getLanguageISO() + "/" + version + "/";
+ }
+ return link + mirrorbrain_getFileName( version, schema );
+ }
+ // error
+ return null;
+ } else {
+ // The following lines are no longer valid and commented out as the porting is done and Mac an official build
+ // if ( platform.indexOf( "Mac" ) != -1 ) {
+ // send MAC requests to porting.o.o
+ // return "http://porting.openoffice.org/mac/download/";
+ // } else {
+ // use direct link
+ return a[2];
+ // }
+ }
+}
+
+/*
+ * special tupel for tracking
+ */
+function mirrorbrain_getTupel( href ) {
+ var retVal = "";
+ var file;
+ file = mirrorbrain_getTagFileName( href );
+ if ( file != null ) {
+ var product, os, lang, version;
+ product = mirrorbrain_getTagProduct( file );
+ version = mirrorbrain_getTagVersion( file );
+ os = mirrorbrain_getTagOS( file );
+ lang = mirrorbrain_getTagLang( file );
+ retVal = product + " " + version + "-" + os + "-" + lang + "-" + version;
+ }
+ return retVal;
+}
+
+/*
+ * extract file name from url
+ */
+function mirrorbrain_getTagFileName( href ) {
+ var retVal;
+ if ( href.indexOf( MIRROR_MIRRORBRAIN_URL + "files/" ) > -1 ) {
+ var s = href.split( "/" );
+ retVal = s[s.length-1];
+ }
+ return retVal;
+}
+
+/*
+ * get product name for tracking, external used method
+ */
+function mirrorbrain_getProduct( href ) {
+ var file;
+ file = mirrorbrain_getTagFileName( href );
+ return mirrorbrain_getTagProduct( file ) + " " + mirrorbrain_getTagVersion( file );
+}
+
+/*
+ * get version for tracking, external used method
+ */
+function mirrorbrain_getVersion( href ) {
+ var file;
+ file = mirrorbrain_getTagFileName( href );
+ return mirrorbrain_getTagVersion( file );
+}
+
+/*
+ * get os for tracking, external used method
+ */
+function mirrorbrain_getOS( href ) {
+ var file;
+ file = mirrorbrain_getTagFileName( href );
+ return mirrorbrain_getTagOS( file );
+}
+
+/*
+ * get language code for tracking, external used method
+ */
+function mirrorbrain_getLang( href ) {
+ var file;
+ file = mirrorbrain_getTagFileName( href );
+ return mirrorbrain_getTagLang( file );
+}
+
+/*
+ * get language code for tracking, internal method
+ */
+function mirrorbrain_getTagLang( file ) {
+ var retVal;
+ if ( file != null && (
+ file.indexOf( "_install-" ) > -1 || (
+ file.indexOf( "_install_" ) > -1 && (
+ file.indexOf( "_Linux_" ) > -1 || file.indexOf( "_MacOS_" ) > -1 || file.indexOf( "_Win_" ) > -1 || file.indexOf( "_Solaris_" ) > -1
+ )
+ ) ) ) {
+
+ var s = file.split( "_install" );
+ s = s[1].split( "." );
+ s = s[0].split( "_" );
+ retVal = s[s.length-1];
+
+ } else if ( file != null && file.indexOf( "_install_" ) > -1 ) {
+ var s = file.split( "_install_" );
+ s = s[1].split( "." );
+ s = s[0].split( "_" );
+ if ( s[s.length-1].indexOf( "deb" ) > -1 ) {
+ retVal = s[s.length-2];
+ } else {
+ retVal = s[s.length-1];
+ }
+ }
+ return retVal;
+}
+
+/*
+ * get os name for tracking, internal method
+ */
+function mirrorbrain_getTagOS( file ) {
+ var retVal;
+ if ( file != null && (
+ file.indexOf( "_install-" ) > -1 || (
+ file.indexOf( "_install_" ) > -1 && (
+ file.indexOf( "_Linux_" ) > -1 || file.indexOf( "_MacOS_" ) > -1 || file.indexOf( "_Win_" ) > -1 || file.indexOf( "_Solaris_" ) > -1
+ )
+ ) ) ) {
+
+ var s = file.split( "_install" );
+ s = s[0].split( "_" );
+ retVal = s[ s.length -2 ] + s[ s.length -1 ];
+ retVal = retVal.toLowerCase();
+ if ( retVal.indexOf( "winx86" ) > -1 ) {
+ retVal = "win";
+ } else if ( retVal == "linuxx86" ) {
+ retVal = "linuxintel";
+ } else if ( retVal == "macosx86" ) {
+ retVal = "macosxintel";
+ } else if ( retVal == "macosppc" ) {
+ retVal = "macosxppc";
+ }
+ if ( file.toLowerCase().indexOf( "wjre" ) > -1 ) {
+ retVal = retVal + "wjre";
+ } else if ( file.indexOf( "install-deb" ) > -1 ) {
+ retVal = retVal + "deb";
+ }
+ } else if ( file != null && file.indexOf( "_install_" ) > -1 ) {
+ var s = file.split( "_install_" );
+ s = s[0].split( "_" );
+ retVal = s[ s.length -1 ];
+ retVal = retVal.toLowerCase();
+ if ( retVal.indexOf( "win32intel" ) > -1 ) {
+ retVal = "win";
+ }
+ if ( file.toLowerCase().indexOf( "wjre" ) > -1 ) {
+ retVal = retVal + "wjre";
+ } else if ( file.indexOf( "_deb" ) > -1 ) {
+ retVal = retVal + "deb";
+ } else if ( file.indexOf( "install-deb" ) > -1 ) {
+ retVal = retVal + "deb";
+ }
+ }
+ return retVal;
+}
+
+/*
+ * get product name for tracking, internal method
+ */
+function mirrorbrain_getTagProduct( file ) {
+ var retVal = null;
+ if ( file != null ) {
+ var s = file.split( "_" );
+ retVal = s[0];
+ }
+ return retVal;
+}
+
+/*
+ * get version for tracking, internal method
+ */
+function mirrorbrain_getTagVersion( file ) {
+ var retVal = null;
+ if ( file != null ) {
+ var s = file.split( "_" );
+ retVal = s[1];
+ if ( s[0] == "OOo-Dev" ) {
+ if ( file.indexOf( "_install-" ) > -1 || (
+ file.indexOf( "_install_" ) > -1 && (
+ file.indexOf( "_Linux_" ) > -1 || file.indexOf( "_MacOS_" ) > -1 || file.indexOf( "_Win_" ) > -1 || file.indexOf( "_Solaris_" ) > -1
+ )
+ ) ) {
+ // new schema
+ if ( s[1].indexOf( "_m" ) > -1 ) {
+ retVal = s[1];
+ } else if ( s[1].indexOf( "m" ) > -1 ) {
+ var s2 = s[1].split( "m" );
+ retVal = s2[0] + "_m" + s2[1];
+ } else {
+ retVal = s[1];
+ }
+ } else {
+ // old schema
+ retVal = s[1] + "_" + s[2];
+ }
+ }
+ }
+ return retVal;
+}
+
+/*
+ * method trim timestamp from version, required for RC, requested by MLA
+ */
+function mirrorbrain_getVersionForDownloadFolder( version ) {
+ var s = null;
+ if ( version.indexOf( "_" ) > -1 ) {
+ s = version.split( "_" )[0];
+ } else {
+ s = version;
+ }
+
+ if ( version == VERSION ) {
+ return version;
+ } else if ( version == OLD_VERSION ) {
+ return version;
+ } else if ( version == RC_VERSION ) {
+ return s;
+ } else if ( version == BETA_VERSION ) {
+ return version;
+ } else if ( version == DEV1_VERSION ) {
+ return version;
+ } else if ( version == DEV2_VERSION ) {
+ return version;
+ } else if ( version == TEST_VERSION ) {
+ return version;
+ }
+ // error
+ return null;
+}
+
+function mirrorbrain_getFileName( version, schema ) {
+ var a = getArray();
+ var platform = getPlatform();
+ var fileName = null;
+
+ if ( hasMirrorLink() ) {
+ // use mirror link
+ if ( schema == "old" ) {
+ if ( version == VERSION ) {
+ fileName = "OOo_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else if ( version == OLD_VERSION ) {
+ fileName = "OOo_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else if ( version == RC_VERSION ) {
+ fileName = "OOo_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else if ( version == BETA_VERSION ) {
+ fileName = "OOo_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else if ( version == DEV1_VERSION ) {
+ fileName = "OOo-Dev_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else if ( version == DEV2_VERSION ) {
+ fileName = "OOo-Dev_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else if ( version == DEVB_VERSION ) {
+ fileName = "OOo-Dev_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else if ( version == TEST_VERSION ) {
+ fileName = "OOo_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else {
+ fileName = null;
+ }
+ } else if ( schema == "new" ) {
+ if ( version == VERSION ) {
+ fileName = "OOo_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else if ( version == OLD_VERSION ) {
+ fileName = "OOo_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else if ( version == RC_VERSION ) {
+ fileName = "OOo_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else if ( version == BETA_VERSION ) {
+ fileName = "OOo_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else if ( version == DEV1_VERSION ) {
+ fileName = "OOo-Dev_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else if ( version == DEV2_VERSION ) {
+ fileName = "OOo-Dev_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else if ( version == DEVB_VERSION ) {
+ fileName = "OOo-Dev_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else if ( version == TEST_VERSION ) {
+ fileName = "OOo_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else {
+ fileName = null;
+ }
+ } else if (schema == "aoo_incubating") {
+ if ( version == VERSION ) {
+ fileName = "Apache_OpenOffice_incubating_" + version + "_" + mirrorbrain_getPlatformForMirror( schema ) + "_" + getLanguageISO() + mirrorbrain_getExtension( schema );
+ } else {
+ fileName = null;
+ }
+ }
+ return fileName;
+ }
+ // error
+ return null;
+}
+
+/*
+ * get platform for mirror-link
+ */
+function mirrorbrain_getPlatformForMirror( schema ) {
+ var a = getArray();
+ if ( navigator.platform != null && String(navigator.platform) != "") {
+ if ( schema == "old" ) {
+ if ( navigator.platform.indexOf( "Win32" ) != -1 ) {
+ return ( a[3] == 'y' ) ? "Win32Intel_install_wJRE" : "Win32Intel_install";
+ } else if ( navigator.platform.indexOf( "Win64" ) != -1 ) {
+ return ( a[3] == 'y' ) ? "Win32Intel_install_wJRE" : "Win32Intel_install";
+ } else if ( navigator.platform.indexOf( "Win" ) != -1 ) {
+ return ( a[3] == 'y' ) ? "Win32Intel_install_wJRE" : "Win32Intel_install";
+ } else if ( navigator.platform.indexOf( "Linux" ) != -1 ) {
+ if ( navigator.platform.indexOf( "64" ) != -1 ) {
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 || navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ return "LinuxX86-64_install";
+ } else {
+ return ( a[3] == 'y' ) ? "LinuxX86-64_install_wJRE" : "LinuxX86-64_install";
+ }
+ } else {
+ return ( a[3] == 'y' ) ? "LinuxX86-64_install_wJRE" : "LinuxX86-64_install";
+ }
+ } else {
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 || navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ return ( a[3] == 'y' ) ? "LinuxIntel_install_wJRE" : "LinuxIntel_install";
+ } else {
+ return ( a[3] == 'y' ) ? "LinuxIntel_install_wJRE" : "LinuxIntel_install";
+ }
+ } else {
+ return ( a[3] == 'y' ) ? "LinuxIntel_install_wJRE" : "LinuxIntel_install";
+ }
+ }
+
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 || navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ return ( a[3] == 'y' ) ? "LinuxIntel_install_wJRE" : "LinuxIntel_install";
+ } else {
+ return ( a[3] == 'y' ) ? "LinuxIntel_install_wJRE" : "LinuxIntel_install";
+ }
+ } else {
+ return ( a[3] == 'y' ) ? "LinuxIntel_install_wJRE" : "LinuxIntel_install";
+ }
+ } else if ( navigator.platform.indexOf( "SunOS i86pc" ) != -1 ) {
+ return ( a[3] == 'y' ) ? "Solarisx86_install_wJRE" : "Solarisx86_install";
+ } else if ( navigator.platform.indexOf( "SunOS sun4u" ) != -1 ) {
+ return ( a[3] == 'y' ) ? "SolarisSparc_install_wJRE" : "SolarisSparc_install";
+ } else if ( navigator.platform.indexOf( "SunOS" ) != -1 ) {
+ return ( a[3] == 'y' ) ? "SolarisSparc_install_wJRE" : "SolarisSparc_install";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "Intel" ) != -1 ) {
+ return "MacOSXIntel_install";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "PPC" ) != -1 ) {
+ return "MacOSXPPC_install";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 ) {
+ return "MacOSXIntel_install";
+ // testing if this code will help to redirect the iPad, iPhone, iPod entries
+ } else if ( navigator.platform.indexOf( "iPad" ) != -1 || navigator.platform.indexOf( "iPhone" ) != -1 || navigator.platform.indexOf( "iPod" ) != -1 ) {
+ return "MacOSXIntel_install" ;
+ } else {
+ // return plain platform
+ return navigator.platform;
+ }
+ } else if ( schema == "new" ) {
+ if ( navigator.platform.indexOf( "Win32" ) != -1 ) {
+ return ( a[3] == 'y' ) ? "Win_x86_install-wJRE" : "Win_x86_install";
+ } else if ( navigator.platform.indexOf( "Win64" ) != -1 ) {
+ return ( a[3] == 'y' ) ? "Win_x86_install-wJRE" : "Win_x86_install";
+ } else if ( navigator.platform.indexOf( "Win" ) != -1 ) {
+ return ( a[3] == 'y' ) ? "Win_x86_install-wJRE" : "Win_x86_install";
+ } else if ( navigator.platform.indexOf( "Linux" ) != -1 ) {
+ if ( navigator.platform.indexOf( "64" ) != -1 ) {
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 || navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ return "Linux_x86-64_install-deb";
+ } else {
+ return ( a[3] == 'y' ) ? "Linux_x86-64_install-rpm-wJRE" : "Linux_x86-64_install-rpm";
+ }
+ } else {
+ return ( a[3] == 'y' ) ? "Linux_x86-64_install-rpm-wJRE" : "Linux_x86-64_install-rpm";
+ }
+ } else {
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 || navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ return "Linux_x86_install-deb";
+ } else {
+ return ( a[3] == 'y' ) ? "Linux_x86_install-rpm-wJRE" : "Linux_x86_install-rpm";
+ }
+ } else {
+ return ( a[3] == 'y' ) ? "Linux_x86_install-rpm-wJRE" : "Linux_x86_install-rpm";
+ }
+ }
+
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 || navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ return "Linux_x86_install-deb";
+ } else {
+ return ( a[3] == 'y' ) ? "Linux_x86_install-rpm-wJRE" : "Linux_x86_install-rpm";
+ }
+ } else {
+ return ( a[3] == 'y' ) ? "Linux_x86_install-rpm-wJRE" : "Linux_x86_install-rpm";
+ }
+ } else if ( navigator.platform.indexOf( "SunOS i86pc" ) != -1 ) {
+ return ( a[3] == 'y' ) ? "Solaris_x86_install-wJRE" : "Solaris_x86_install";
+ } else if ( navigator.platform.indexOf( "SunOS sun4u" ) != -1 ) {
+ return ( a[3] == 'y' ) ? "Solaris_Sparc_install-wJRE" : "Solaris_Sparc_install";
+ } else if ( navigator.platform.indexOf( "SunOS" ) != -1 ) {
+ return ( a[3] == 'y' ) ? "Solaris_Sparc_install-wJRE" : "Solaris_Sparc_install";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "Intel" ) != -1 ) {
+ return "MacOS_x86_install";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "PPC" ) != -1 ) {
+ return "MacOS_PPC_install";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 ) {
+ return "MacOS_x86_install";
+ // testing if this code will help to redirect the iPad, iPhone, iPod entries
+ } else if ( navigator.platform.indexOf( "iPad" ) != -1 || navigator.platform.indexOf( "iPhone" ) != -1 || navigator.platform.indexOf( "iPod" ) != -1 ) {
+ return "MacOS_x86_install" ;
+ } else {
+ // return plain platform
+ return navigator.platform;
+ }
+ } else if (schema == "aoo_incubating") {
+ if ( navigator.platform.indexOf( "Win32" ) != -1 ) {
+ return "Win_x86_install";
+ } else if ( navigator.platform.indexOf( "Win64" ) != -1 ) {
+ return "Win_x86_install";
+ } else if ( navigator.platform.indexOf( "Win" ) != -1 ) {
+ return "Win_x86_install";
+ } else if ( navigator.platform.indexOf( "Linux" ) != -1 ) {
+ if ( navigator.platform.indexOf( "64" ) != -1 ) {
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 || navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ return "Linux_x86-64_install-deb";
+ } else {
+ return "Linux_x86-64_install-rpm";
+ }
+ } else {
+ return "Linux_x86-64_install-rpm";
+ }
+ } else {
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 || navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ return "Linux_x86_install-deb";
+ } else {
+ return "Linux_x86_install-rpm";
+ }
+ } else {
+ return "Linux_x86_install-rpm";
+ }
+ }
+
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 || navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ return "Linux_x86_install-deb";
+ } else {
+ return "Linux_x86_install-rpm";
+ }
+ } else {
+ return "Linux_x86_install-rpm";
+ }
+ /*} else if ( navigator.platform.indexOf( "SunOS i86pc" ) != -1 ) {
+ return "Solaris_x86_install";
+ } else if ( navigator.platform.indexOf( "SunOS sun4u" ) != -1 ) {
+ return "Solaris_Sparc_install";
+ } else if ( navigator.platform.indexOf( "SunOS" ) != -1 ) {
+ return "Solaris_Sparc_install";*/
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "Intel" ) != -1 ) {
+ return "MacOS_x86_install";
+ /*} else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "PPC" ) != -1 ) {
+ return "MacOS_PPC_install";*/
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 ) {
+ return "MacOS_x86_install";
+ // testing if this code will help to redirect the iPad, iPhone, iPod entries
+ } else if ( navigator.platform.indexOf( "iPad" ) != -1 || navigator.platform.indexOf( "iPhone" ) != -1 || navigator.platform.indexOf( "iPod" ) != -1 ) {
+ return "MacOS_x86_install" ;
+ } else {
+ // return plain platform
+ return navigator.platform;
+ }
+ }
+ } // null or empty navigator.platform fallback to win regardless of schema
+ if (schema != "aoo_incubating") {
+ return ( a[3] == 'y' ) ? "Win_x86_install-wJRE" : "Win_x86_install";
+ } else {
+ return "Win_x86_install";
+ }
+}
+
+/*
+ * get extension for mirror-link
+ */
+function mirrorbrain_getExtension( schema ) {
+ var a = getArray();
+ if ( navigator.platform != null ) {
+ if ( navigator.platform.indexOf( "Win32" ) != -1 ) {
+ return ".exe";
+ } else if ( navigator.platform.indexOf( "Win64" ) != -1 ) {
+ return ".exe";
+ } else if ( navigator.platform.indexOf( "Win" ) != -1 ) {
+ return ".exe";
+ } else if ( navigator.platform.indexOf( "Linux" ) != -1 ) {
+ if ( navigator.userAgent != null ) {
+ if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 || navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ) {
+ if ( schema == "old" ) {
+ return "_deb.tar.gz";
+ } else if ( schema == "new" ) {
+ return ".tar.gz";
+ } else {
+ return ".tar.gz";
+ }
+ } else {
+ return ".tar.gz";
+ }
+ } else {
+ return ".tar.gz";
+ }
+ } else if ( navigator.platform.indexOf( "SunOS i86pc" ) != -1 ) {
+ return ".tar.gz";
+ } else if ( navigator.platform.indexOf( "SunOS sun4u" ) != -1 ) {
+ return ".tar.gz";
+ } else if ( navigator.platform.indexOf( "SunOS" ) != -1 ) {
+ return ".tar.gz";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "Intel" ) != -1 ) {
+ return ".dmg";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "PPC" ) != -1 ) {
+ return ".dmg";
+ } else if ( navigator.platform.indexOf( "Mac" ) != -1 ) {
+ return ".dmg";
+ // this code provides working entries for iPad, iPhone, iPod
+ } else if ( navigator.platform.indexOf( "iPad" ) != -1 || navigator.platform.indexOf( "iPhone" ) != -1 || navigator.platform.indexOf( "iPod" ) != -1 ) {
+ return ".dmg" ;
+ } else {
+ return navigator.platform;
+ }
+ }
+ return null;
+}
Added: websites/staging/ooo-site/trunk/content/download/globalvars_new_dl.js
==============================================================================
--- websites/staging/ooo-site/trunk/content/download/globalvars_new_dl.js (added)
+++ websites/staging/ooo-site/trunk/content/download/globalvars_new_dl.js Mon May 7 16:14:11 2012
@@ -0,0 +1,150 @@
+/* This file is to maintain version information that can be used
+ on all websites via JavaScript when including this file.
+
+ Instead of hard coded version data please use these variables.
+ Example:
+
+ Wrong: "We are proud to announce the availability of our new
+ OpenOffice.org 3.0.0 release."
+ Correct: "We are proud to announce the availability of our new
+ OpenOffice.org " + VERSION + " release."
+
+ MIRROR: set default mirror site
+ SCHEMA: reflects the download-set naming-schema with "old" or "new"
+*/
+
+// The supported mirror hosts, 0 means not ready to receive load
+// The mirror ratio in percent
+var MIRROR_ASF_ACTIVE = 1;
+var MIRROR_SF_ACTIVE = 1;
+var MIRROR_MB_ACTIVE = 0;
+var MIRROR_RATIO_1 = 75;
+var MIRROR_RATIO_2 = 33;
+var MIRROR_HOSTS = [ "Apache", "MirrorBrain", "SourceForge" ];
+var MIRROR_HOSTS_WEIGHT = [ 1, 2, 3 ];
+var MIRROR_HOSTS_WEIGHTED = [ "Apache", "MirrorBrain", "MirrorBrain", "SourceForge", "SourceForge", "SourceForge" ];
+
+// Exchange the variables resp. its content to switch the MirrorBrain server
+var MIRROR_BOUNCER_URL = "http://openoffice.bouncer.osuosl.org/";
+var MIRROR_MIRRORBRAIN_URL = "http://openoffice.mirrorbrain.org/";
+// var MIRROR_MIRRORBRAIN_URL = "http://download.services.openoffice.org/";
+var MIRROR_SOURCEFORGE_URL = "http://sourceforge.net/projects/openofficeorg.mirror/";
+var MIRROR_APACHE_URL = "http://www.apache.org/dyn/closer.cgi/incubator/ooo/";
+// don't add these on, they're alredy supplied by mirrobrarin_getLink, reference only
+var SOURCEFORGE_SUFFIX = "files/stable/3.4/";
+var APACHE_SUFFIX = "files/stable/3.4/";
+var MIRROR_SOURCEFORGE_REF = MIRROR_SOURCEFORGE_URL + SOURCEFORGE_SUFFIX;
+var MIRROR_APACHE_REF = MIRROR_APACHE_URL + APACHE_SUFFIX;
+
+// set initial mirror to Apache
+var MIRROR = MIRROR_SOURCEFORGE_URL;
+
+// Variables to shortcut long URLs
+var MIRROR_MAC_PPC_URL = "http://ooopackages.good-day.net/pub/OpenOffice.org/contrib/macosppc/";
+var MIRROR_FREEBSD32_URL = "http://ooopackages.good-day.net/pub/OpenOffice.org/contrib/freebsdx86/";
+var MIRROR_FREEBSD64_URL = "http://ooopackages.good-day.net/pub/OpenOffice.org/contrib/freebsdx86-64/";
+var MIRROR_EXT_URL = MIRROR_MIRRORBRAIN_URL + "files/extended/";
+var MIRROR_LOC_URL = MIRROR_MIRRORBRAIN_URL + "files/localized/";
+var MIRROR_STABLE_URL = MIRROR_MIRRORBRAIN_URL + "files/stable/";
+
+//Exchange the variables resp. its content to switch the MirrorBrain server
+var MIRROR_BOUNCER_URL = "http://openoffice.bouncer.osuosl.org/";
+var MIRROR_MIRRORBRAIN_URL = "http://openoffice.mirrorbrain.org/";
+var MIRROR_MIRRORBRAIN2_URL = "http://download.services.openoffice.org/";
+
+
+//Variables to shortcut long URLs
+
+//var MIRROR_EXT_URL = MIRROR_MIRRORBRAIN_URL + "files/extended/";
+//var MIRROR_LOC_URL = MIRROR_MIRRORBRAIN_URL + "files/localized/";
+//var MIRROR_STABLE_URL = MIRROR_MIRRORBRAIN_URL + "files/stable/";
+var MIRROR_EXT_URL = MIRROR_SOURCEFORGE_URL + "files/extended/";
+var MIRROR_LOC_URL = MIRROR_SOURCEFORGE_URL + "files/localized/";
+var MIRROR_stable_URL = MIRROR_SOURCEFORGE_URL + "files/stable/";
+
+
+
+//The most recent stable release
+//var VERSION = "3.3.0";
+var VERSION = "3.4.0";
+//var MIRROR = "sourceforge";
+var SCHEMA = "aoo_incubating";
+
+
+//The minimal needed JRE version for the stable release
+var JRE_VERSION = "1.6";
+
+//The previously major release
+var OLD_VERSION = "3.3.0";
+var OLD_MIRROR = "mirrorbrain";
+var OLD_SCHEMA = "new";
+
+
+//The maximal available number of languages
+var LANG_MAX = 133;
+
+//Data for the most recent Release Candidate
+// Apache_OpenOffice_incubating_3.4.0_ ???? file name prefix
+var RC_NAME = "3.3.0 RC ";
+// RC_BUILD = "340m1(Build:9590)";
+var RC_BUILD = "3.3.0rc10";
+// var RC_DATE = "20120419";
+var RC_DATE = "20110118";
+var RC_VERSION = "OOO330m20";
+var RC_NUMBER = 10;
+var RC_ACTIVE = 1;
+var RC_PPC = 1;
+var RC_FREEBSD = 0;
+var RC_FULL_LANG = new Array( "ar","bg","bn","ca","ca-XV","cs","da","de","el","en-GB","en-US","es","et","eu","fi","fr","ga","gl","he","hu","it","ja","km","ko","lt","mk","nb","nl","om","pl","pt","pt-BR","ru","sh","sl","sr","sv","tr","vi","zh-CN","zh-TW" );
+var RC_LP_LANG = new Array( "ar","as","ast","be-BY","bg","bn","ca","ca-XV","cs","da","de","dz","el","en-GB","en-US","eo","es","et","eu","fi","fr","ga","gl","gu","he","hi","hu","id","is","it","ja","ka","km","kn","ko","ku","lt","lv","mk","ml","mr","my","nb","nl","nn","oc","om","or","pa-IN","pl","pt","pt-BR","ro","ru","sh","si","sk","sl","sr","sv","ta","te","th","tr","ug","uk","uz","vi","zh-CN","zh-TW" );
+var RC_SDK_LANG = new Array( "en-US" );
+var RC_MIRROR = "mirrorbrain";
+var RC_SCHEMA = "new";
+
+//Data for the most recent Beta Release
+var BETA_NAME = "3.4 Beta ";
+var BETA_BUILD = "3.4beta";
+var BETA_DATE = "20110411";
+var BETA_VERSION = "OOO340m0";
+var BETA_NUMBER = 1;
+var BETA_ACTIVE = 1;
+var BETA_PPC = 0;
+var BETA_FREEBSD = 0;
+var BETA_FULL_LANG = new Array( "en-US" );
+var BETA_LP_LANG = new Array( "ar","as","ast","be-BY","bg","bn","ca","ca-XV","cs","da","de","dz","el","en-GB","eo","es","et","eu","fi","fr","ga","gl","gu","he","hi","hu","id","is","it","ja","ka","km","kn","ko","ku","lt","lv","mk","ml","mr","my","nb","nl","nn","oc","om","or","pa-IN","pl","pt","pt-BR","ro","ru","sh","si","sk","sl","sr","sv","ta","te","th","tr","ug","uk","uz","vi","zh-CN","zh-TW" );
+var BETA_SDK_LANG = new Array( "en-US" );
+var BETA_MIRROR = "mirrorbrain";
+var BETA_SCHEMA = "new";
+
+//Data for the most recent Dev Build from the release codeline
+//var DEV1_TEXT = "OOO340";
+//var DEV1_BUILD = "OOo-Dev 3.4";
+//var DEV1_VERSION = "";
+//var DEV1_PPC = 0;
+//var DEV1_FREEBSD = 0;
+//var DEV1_FULL_LANG = new Array( "en-US" );
+//var DEV1_LP_LANG = new Array( "ar","de","fr","ja","ru" );
+//var DEV1_SDK_LANG = new Array( "en-US" );
+//var DEV1_MIRROR = "mirrorbrain";
+//var DEV1_SCHEMA = "new";
+
+//Data for the most recent Dev Build from the unstable codeline
+//var DEV2_TEXT = "DEV300";
+//var DEV2_BUILD = "OOo-Dev 3.x";
+//var DEV2_VERSION = "DEV300m106";
+//var DEV2_PPC = 0;
+//var DEV2_FREEBSD = 0;
+//var DEV2_FULL_LANG = new Array( "en-US" );
+//var DEV2_LP_LANG = new Array( "ar","de","fr","ja","ru" );
+//var DEV2_SDK_LANG = new Array( "en-US" );
+//var DEV2_MIRROR = "mirrorbrain";
+//var DEV2_SCHEMA = "new";
+
+//The test release for the mirror system
+//var TEST_VERSION = "3.1.0";
+//var TEST_MIRROR = "mirrorbrain";
+//var TEST_SCHEMA = "old";
+
+
+
+
Added: websites/staging/ooo-site/trunk/content/download/languages_new_dl.js
==============================================================================
--- websites/staging/ooo-site/trunk/content/download/languages_new_dl.js (added)
+++ websites/staging/ooo-site/trunk/content/download/languages_new_dl.js Mon May 7 16:14:11 2012
@@ -0,0 +1,103 @@
+/* first element: redir will redirect to contributing page, then to url,
+ "here" will offer the download here and "skip" will directly go to the NL-webpage
+ if NL-group has its own contributing webpage and want to use it */
+
+/* skip for all, since contributing-page doesn't redirect anymore ...
+ v1: ISO-short with array of 'skip/here' (old, not used),
+ v2: language name in en-US,
+ v3: link to NL-webpage,
+ v4: flag indicating if builds with JRE are available,
+ v5: flag for mirrorsystem usage ('y' to use Mirrorbrain and 'n' to use the NL-webpage),
+ v6: flag for mirrorsystem for Mac OS (only in combination with previous flag !) */
+
+/* v1 , v2 , v3 ,v4, v5, v6 */
+
+var languages = {
+"ar": {"-": ['skip', 'Arabic', 'http://ar.openoffice.org/', 'y','y','y']},
+"eu": {"-": ['skip', 'Basque', 'http://eu.openoffice.org/', 'n','n','n']},
+"bn": {"-": ['skip', 'Bengali', 'http://bn.openoffice.org/', 'n','n','n']},
+"bg": {"-": ['skip', 'Bulgarian', 'http://bg.openoffice.org/', 'n','n','n']},
+"ca": {"-": ['skip', 'Catalan', 'http://www.softcatala.org/projectes/openoffice/', 'n','n','n'],
+ "ca": ['skip', 'Catalan', 'http://www.softcatala.org/projectes/openoffice/', 'n','n','n'],
+ "xv": ['skip', 'Catalan (Valencian)', 'http://download.openoffice.org/other.html', 'n','n','n']},
+"cs": {"-": ['skip', 'Czech', 'http://cs.openoffice.org/', 'y','y','y']},
+"zh": {"-": ['skip', 'Chinese', 'http://zh.openoffice.org/new/zh_cn/downloads.html','y','y','y'],
+ "cn": ['skip', 'Chinese (simplified)', 'http://zh.openoffice.org/new/zh_cn/downloads.html','y','y','y'],
+ "tw": ['skip', 'Chinese (traditional)', 'http://zh.openoffice.org/new/zh_tw/downloads.html','y','y','y']},
+"da": {"-": ['skip', 'Danish', 'http://da.openoffice.org/', 'n','n','n']},
+"nl": {"-": ['skip', 'Dutch', 'http://nl.openoffice.org/downloaden.html', 'y','y','y']},
+"en": {"-": ['here', 'English', 'http://www.openoffice.org/download/other.html', 'y','y','y'],
+ "en": ['here', 'English', 'http://www.openoffice.org/download/other.html', 'y','y','y'],
+ "us": ['here', 'English (US)', 'http://www.openoffice.org/download/other.html', 'y','y','y'],
+ "gb": ['here', 'English (British)', 'http://download.openoffice.org/other.html', 'n','n','n']},
+"et": {"-": ['skip', 'Estonian', 'http://download.openoffice.org/other.html', 'n','n','n']},
+"fi": {"-": ['skip', 'Finnish', 'http://fi.openoffice.org/lataa.html', 'y','y','y']},
+"fr": {"-": ['skip', 'French', 'http://fr.openoffice.org/', 'y','y','y']},
+"gl": {"-": ['skip', 'Galician', 'http://gl.openoffice.org/', 'y','y','y']},
+"de": {"-": ['skip', 'German', 'http://de.openoffice.org/', 'y','y','y']},
+"el": {"-": ['skip', 'Greek', 'http://el.openoffice.org/', 'n','n','n']},
+"he": {"-": ['skip', 'Hebrew', 'http://www.openoffice.org.il/', 'n','n','n']},
+"hu": {"-": ['skip', 'Hungarian', 'http://hu.openoffice.org/about-downloads.html', 'y','y','y']},
+"ga": {"-": ['skip', 'Irish', 'http://ga.openoffice.org/', 'n','n','n']},
+"it": {"-": ['skip', 'Italian', 'http://it.openoffice.org/download/', 'y','y','y']},
+"ja": {"-": ['skip', 'Japanese', 'http://ja.openoffice.org/', 'y','y','y']},
+"km": {"-": ['skip', 'Khmer', 'http://km.openoffice.org/', 'n','n','n']},
+"ko": {"-": ['skip', 'Korean', 'http://ko.openoffice.org/', 'n','y','y']},
+"lt": {"-": ['skip', 'Lithuanian', 'http://lt.openoffice.org/', 'n','n','n']},
+"mk": {"-": ['skip', 'Macedonian', 'http://mk.openoffice.org/', 'n','n','n']},
+"nb": {"-": ['skip', 'Norwegian (Bokmal)', 'http://no.openoffice.org/', 'n','n','n']},
+"om": {"-": ['skip', 'Oromo', 'http://om.openoffice.org/', 'n','n','n']},
+"pl": {"-": ['skip', 'Polish', 'http://pl.openoffice.org/product.download.html', 'n','n','n']},
+"pt": {"-": ['skip', 'Portuguese (European)', 'http://pt.openoffice.org/download/download.htm', 'y','y','y'],
+ "pt": ['skip', 'Portuguese (European)', 'http://pt.openoffice.org/download/download.htm', 'y','y','y'],
+ "br": ['skip', 'Portuguese (Brazilian)','http://br-pt.openoffice.org/', 'y','y','y']},
+"ru": {"-": ['skip', 'Russian', 'http://ru.openoffice.org/', 'y','y','y']},
+"sr": {"-": ['skip', 'Serbian (Cyrillic)', 'http://sr.openoffice.org/preuzmi.html', 'n','n','n']},
+"sh": {"-": ['skip', 'Serbian (Latin)', 'http://sr.openoffice.org/lat/preuzmi.html', 'n','n','n']},
+"sl": {"-": ['skip', 'Slovenian', 'http://sl.openoffice.org/', 'n','n','n']},
+"es": {"-": ['skip', 'Spanish', 'http://es.openoffice.org/programa/', 'y','y','y']},
+"sv": {"-": ['skip', 'Swedish', 'http://sv.openoffice.org/get/', 'n','n','n']},
+"tr": {"-": ['skip', 'Turkish', 'http://tr.openoffice.org/', 'n','n','n']},
+"vi": {"-": ['skip', 'Vietnamese', 'http://vi.openoffice.org/', 'y','y','y']},
+
+"as": {"-": ['skip', 'Assamese', 'http://as.openoffice.org/', 'n','n','n']},
+"ast":{"-": ['skip', 'Asturian', 'http://ast.openoffice.org/', 'n','n','n']},
+"be": {"-": ['skip', 'Belarusian', 'http://be.openoffice.org/', 'n','n','n'],
+ "be": ['skip', 'Belarusian', 'http://be.openoffice.org/', 'n','n','n'],
+ "by": ['skip', 'Belarusian', 'http://be.openoffice.org/', 'n','n','n']},
+"my": {"-": ['skip', 'Burmese', 'http://my.openoffice.org/', 'n','n','n']},
+"hr": {"-": ['skip', 'Croatian', 'http://hr.openoffice.org/', 'n','n','n']},
+"dz": {"-": ['skip', 'Dzongkha', 'http://dz.openoffice.org/', 'n','n','n']},
+"eo": {"-": ['skip', 'Esperanto', 'http://eo.openoffice.org/', 'n','n','n']},
+"ka": {"-": ['skip', 'Georgian', 'http://ka.openoffice.org/', 'n','n','n']},
+"gu": {"-": ['skip', 'Gujarati', 'http://gu.openoffice.org/', 'n','n','n']},
+"hi": {"-": ['skip', 'Hindi', 'http://hi.openoffice.org/', 'n','n','n']},
+"is": {"-": ['skip', 'Icelandic', 'http://is.openoffice.org/', 'n','n','n']},
+"id": {"-": ['skip', 'Indonesian', 'http://id.openoffice.org/', 'n','n','n']},
+"kn": {"-": ['skip', 'Kannada', 'http://kn.openoffice.org/', 'n','n','n']},
+"ku": {"-": ['skip', 'Kurdish', 'http://ku.openoffice.org/', 'n','n','n']},
+"lv": {"-": ['skip', 'Latvian', 'http://lv.openoffice.org/', 'n','n','n']},
+"lo": {"-": ['skip', 'Laotian', 'http://lo.openoffice.org/', 'n','n','n']},
+"ml": {"-": ['skip', 'Malayalam', 'http://ml.openoffice.org/', 'n','n','n']},
+"ms": {"-": ['skip', 'Malaysian', 'http://ms.openoffice.org/', 'n','n','n']},
+"mr": {"-": ['skip', 'Marathi', 'http://mr.openoffice.org/', 'n','n','n']},
+"mn": {"-": ['skip', 'Mongolian', 'http://mn.openoffice.org/', 'n','n','n']},
+"nn": {"-": ['skip', 'Norwegian (Nynorsk)', 'http://no.openoffice.org/', 'n','n','n']},
+"no": {"-": ['skip', 'Norwegian', 'http://no.openoffice.org/', 'n','n','n']},
+"oc": {"-": ['skip', 'Occitan', 'http://oc.openoffice.org/', 'n','n','n']},
+"or": {"-": ['skip', 'Oriya', 'http://or.openoffice.org/', 'n','n','n']},
+"pa": {"-": ['skip', 'Punjabi', 'http://pa.openoffice.org/', 'n','n','n'],
+ "pa": ['skip', 'Punjabi', 'http://pa.openoffice.org/', 'n','n','n'],
+ "in": ['skip', 'Punjabi', 'http://pa.openoffice.org/', 'n','n','n']},
+"ro": {"-": ['skip', 'Romanian', 'http://ro.openoffice.org/', 'n','n','n']},
+"si": {"-": ['skip', 'Sinhala', 'http://si.openoffice.org/', 'n','n','n']},
+"sk": {"-": ['skip', 'Slovak', 'http://sk.openoffice.org/', 'n','n','n']},
+"ta": {"-": ['skip', 'Tamil', 'http://ta.openoffice.org/', 'n','n','n']},
+"te": {"-": ['skip', 'Telugu', 'http://te.openoffice.org/', 'n','n','n']},
+"th": {"-": ['skip', 'Thai', 'http://th.openoffice.org/', 'n','n','n']},
+"uk": {"-": ['skip', 'Ukrainian', 'http://uk.openoffice.org/', 'n','n','n']},
+"ug": {"-": ['skip', 'Uyghur', 'http://ug.openoffice.org/', 'n','n','n']},
+"uz": {"-": ['skip', 'Uzbek', 'http://uz.openoffice.org/', 'n','n','n']},
+"cy": {"-": ['skip', 'Welsh', 'http://cy.openoffice.org/', 'n','n','n']}
+
+};