Return-Path: X-Original-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C8935D735 for ; Mon, 17 Sep 2012 12:44:43 +0000 (UTC) Received: (qmail 47642 invoked by uid 500); 17 Sep 2012 12:44:43 -0000 Delivered-To: apmail-incubator-ooo-commits-archive@incubator.apache.org Received: (qmail 47610 invoked by uid 500); 17 Sep 2012 12:44:43 -0000 Mailing-List: contact ooo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-commits@incubator.apache.org Received: (qmail 47600 invoked by uid 99); 17 Sep 2012 12:44:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Sep 2012 12:44:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Sep 2012 12:44:41 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 3DC7F23889D7 for ; Mon, 17 Sep 2012 12:43:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r832255 - in /websites/staging/ooo-site/trunk: cgi-bin/ content/ content/download/test/new/download.js Date: Mon, 17 Sep 2012 12:43:58 -0000 To: ooo-commits@incubator.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120917124358.3DC7F23889D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: buildbot Date: Mon Sep 17 12:43:57 2012 New Revision: 832255 Log: Staging update by buildbot for openofficeorg 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/new/download.js Propchange: websites/staging/ooo-site/trunk/cgi-bin/ ------------------------------------------------------------------------------ --- cms:source-revision (original) +++ cms:source-revision Mon Sep 17 12:43:57 2012 @@ -1 +1 @@ -1386585 +1386586 Propchange: websites/staging/ooo-site/trunk/content/ ------------------------------------------------------------------------------ --- cms:source-revision (original) +++ cms:source-revision Mon Sep 17 12:43:57 2012 @@ -1 +1 @@ -1386585 +1386586 Modified: websites/staging/ooo-site/trunk/content/download/test/new/download.js ============================================================================== --- websites/staging/ooo-site/trunk/content/download/test/new/download.js (original) +++ websites/staging/ooo-site/trunk/content/download/test/new/download.js Mon Sep 17 12:43:57 2012 @@ -1,5 +1,6 @@ /* * Overview of all functions defined below + * --------------------------------------- * function getLanguage () * function hasMirrorLink () * function getLink () @@ -8,21 +9,22 @@ */ /* - * define global variables + * Define global variables */ var LANG_ISO = ""; var LANG_ARRAY = ""; var PLATFORM = ""; var UI_PLATFORM = ""; +var FILENAME = ""; var EXTENSION = ""; var CHECKSUM_ASC = ""; var CHECKSUM_MD5 = ""; var CHECKSUM_SHA256 = ""; /* - * get array and ISO code for language - * depends on nl_language + * Get array and ISO code for language + * Depends on nl_language */ function getLanguage() { var language = ""; @@ -36,8 +38,7 @@ function getLanguage() { 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. + // Convert "en" to "en-US" as well since en-US build is the canonical translation, and thus better tested. if ( !language || language == "" || language == "null" || language == "en" ) language = "en-US"; if ( language == "pt" ) @@ -53,7 +54,7 @@ function getLanguage() { var thisLanguageSet = languages[ languageCode ]; if ( thisLanguageSet == null ) { - // language code not found inside array + // Language code not found inside array language = "en-US"; languageCode = "en"; regionCode = "us"; @@ -61,20 +62,20 @@ function getLanguage() { } if ( regionCode != null ) { - // fix for Port. pt-PT downloads named only pt without region code! + // Fix for Portuguese pt-PT downloads named only pt without region code! if ( regionCode == "pt" && languageCode == "pt" ) language = languageCode; - // found additional region code + // If an additional region code was found if ( thisLanguageSet[ regionCode ] != null ) { - // choose langCode-regionCode + // Then choose langCode-regionCode language = languageCode + "-" + regionCode.toUpperCase(); thisLanguage = thisLanguageSet[ regionCode ]; } else { - // choose default + // Choose the default langCode thisLanguage = thisLanguageSet[ "-" ]; if ( languageCode == "en" ) { - // special case, default is en-US for en-XX + // Special case, default is en-US for en-XX language = "en-US"; regionCode = "us"; thisLanguageSet = languages[ languageCode ]; @@ -84,19 +85,18 @@ function getLanguage() { } } } else { - // choose default for none given region code + // Choose the default for none given region code thisLanguage = thisLanguageSet[ "-" ]; } LANG_ISO = language; LANG_ARRAY = thisLanguage; NATIVE_LANG = thisLanguage[ 2 ]; - // return thisLanguage; } /* - * get flag for mirror link - * depends on array-list + * Get flag for mirror link + * Depends on array-list */ function hasMirrorLink() { if ( PLATFORM == "no_mirror_platform" ) @@ -110,8 +110,8 @@ function hasMirrorLink() { } /* - * get link to mirror system for download-set and checksum file - * depends on array-list + * Get link to mirror system for download-set and checksum file + * Depends on array-list */ function getLink() { var file_link = ""; @@ -123,21 +123,29 @@ function getLink() { if ( NL_LANGUAGE == "" ) NL_LANGUAGE = LANG_ISO; - // trim timestamp from version, required for RC + // Trim timestamp from version, required for RC // if ( version.indexOf( "_" ) > -1 ) // version = version.split( "_" )[0]; if ( hasMirrorLink() ) { + file_link = PEOPLE_BASE_URL + VERSION + "/binaries/" + NL_LANGUAGE + "/Apache_OpenOffice_incubating_" + file_link = file_link + VERSION + "_" + PLATFORM + "_" + NL_LANGUAGE + EXTENSION; + FILENAME = "Apache_OpenOffice_incubating_" + VERSION + "_" + PLATFORM + "_" + NL_LANGUAGE + EXTENSION; + if ( NL_LANGUAGE == "en-US" ) { - file_link = SOURCEFORGE_BASE_URL + "files/stable/" + VERSION + "/Apache_OpenOffice_incubating_" + VERSION + "_" + PLATFORM + "_" + NL_LANGUAGE + EXTENSION + "/download"; - chk_link = APACHE_DIST_BASE_URL + "files/stable/" + VERSION + "/Apache_OpenOffice_incubating_" + VERSION + "_" + PLATFORM + "_" + NL_LANGUAGE + EXTENSION; + chk_link = APACHE_DIST_BASE_URL + "files/stable/" + VERSION + chk_link = chk_link + "/Apache_OpenOffice_incubating_" + VERSION + "_" + PLATFORM + "_" + chk_link = chk_link + NL_LANGUAGE + EXTENSION; } else { - file_link = SOURCEFORGE_BASE_URL + "files/localized/" + NL_LANGUAGE + "/" + VERSION + "/Apache_OpenOffice_incubating_" + VERSION + "_" + PLATFORM + "_" + NL_LANGUAGE + EXTENSION + "/download"; - chk_link = APACHE_DIST_BASE_URL + "files/localized/" + LANG_ISO + "/" + VERSION + "/Apache_OpenOffice_incubating_" + VERSION + "_" + PLATFORM + "_" + NL_LANGUAGE + EXTENSION; + chk_link = APACHE_DIST_BASE_URL + "files/localized/" + NL_LANGUAGE + "/" + VERSION + chk_link = chk_link + "/Apache_OpenOffice_incubating_" + VERSION + "_" + PLATFORM + "_" + chk_link = chk_link + NL_LANGUAGE + EXTENSION; } + CHECKSUM_ASC = chk_link + ".asc"; CHECKSUM_MD5 = chk_link + ".md5"; CHECKSUM_SHA256 = chk_link + ".sha256"; + // return file_link + "/download"; return file_link; } else { CHECKSUM_ASC = "no_checksum"; @@ -148,13 +156,11 @@ function getLink() { } /* - * get platform of browser - * depending on what is recognized from browser's user-agent data + * Get platform of browser + * Depending on what is recognized from browser's data for platform and user-agent */ function getPlatform() { - // assume a not recognizable platform first and apply respective values - - // if you need help or more data: "http://www.useragentstring.com" + // For more help or data see: "http://www.useragentstring.com" if ( navigator.platform != "" ) { if ( navigator.platform.toLowerCase().indexOf( "windows" ) != -1 ) { @@ -245,7 +251,7 @@ function getPlatform() { } /* - * set document.location to start the download + * Set document.location to start the download */ function openItem( itemid, uri ) { var thisDocument = document.getElementById( "downloadextendedtext" );