www: 42e99048: Update to be able to download the Gtk Ru...

datallah at pidgin.im datallah at pidgin.im
Thu May 13 10:21:45 EDT 2010


-----------------------------------------------------------------
Revision: 42e99048bb8a315c96cbaeabfbf373dc4124d217
Ancestor: 1589f905a2fc490f1de4720994ad874ed18bda03
Author: datallah at pidgin.im
Date: 2010-05-13T14:03:20
Branch: im.pidgin.www
URL: http://d.pidgin.im/viewmtn/revision/info/42e99048bb8a315c96cbaeabfbf373dc4124d217

Modified files:
        htdocs/win32/download_redir.php

ChangeLog: 

Update to be able to download the Gtk Runtime zip file

-------------- next part --------------
============================================================
--- htdocs/win32/download_redir.php	cce8e06e2739a645748732e84863bbc00ad7c797
+++ htdocs/win32/download_redir.php	59663c7ef2612e4ed4236ebce01433dd0543379f
@@ -1,39 +1,68 @@
 <?php
 
-/* Build the map of packageID to URL */
-$dl_map = array();
-$dl_map['aspell_core'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-0-50-3-3-Setup.exe';
-$dl_map['lang_br'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-br-0.50-2-3.exe';
-$dl_map['lang_ca'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-ca-0.50-2-3.exe';
-$dl_map['lang_cs'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-cs-0.50-2-3.exe';
-$dl_map['lang_cy'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-cy-0.50-3-3.exe';
-$dl_map['lang_da'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-da-0.50-2-3.exe';
-$dl_map['lang_de'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-de-0.50-2-3.exe';
-$dl_map['lang_el'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-el-0.50-3-3.exe';
-$dl_map['lang_en'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-en-0.50-2-3.exe';
-$dl_map['lang_eo'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-eo-0.50-2-3.exe';
-$dl_map['lang_es'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-es-0.50-2-3.exe';
-$dl_map['lang_fo'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-fo-0.50-2-3.exe';
-$dl_map['lang_fr'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-fr-0.50-3-3.exe';
-$dl_map['lang_it'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-it-0.50-2-3.exe';
-$dl_map['lang_nl'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-nl-0.50-2-3.exe';
-$dl_map['lang_no'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-no-0.50-2-3.exe';
-$dl_map['lang_pl'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-pl-0.50-2-3.exe';
-$dl_map['lang_pt'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-pt-0.50-2-3.exe';
-$dl_map['lang_ro'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-ro-0.50-2-3.exe';
-$dl_map['lang_ru'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-ru-0.50-2-3.exe';
-$dl_map['lang_sk'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-sk-0.50-2-3.exe';
-$dl_map['lang_sv'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-sv-0.50-2-3.exe';
-$dl_map['lang_uk'] = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-uk-0.50-3-3.exe';
-
-/* Retrieve the version - we don't do anything with it right now */
-if (isset($_GET['version'])) {
-    $version = $_GET['version'];
+if (isset($_GET['dl_pkg'])) {
+	$dl_pkg = $_GET['dl_pkg'];
+	if ($dl_pkg == 'aspell_core') {
+		$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-0-50-3-3-Setup.exe';
+	} else if (strpos($dl_pkg, 'lang_') === 0) {
+		if ($dl_pkg == 'lang_br') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-br-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_ca') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-ca-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_cs') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-cs-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_cy') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-cy-0.50-3-3.exe';
+		} else if ($dl_pkg == 'lang_da') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-da-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_de') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-de-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_el') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-el-0.50-3-3.exe';
+		} else if ($dl_pkg == 'lang_en') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-en-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_eo') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-eo-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_es') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-es-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_fo') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-fo-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_fr') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-fr-0.50-3-3.exe';
+		} else if ($dl_pkg == 'lang_it') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-it-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_nl') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-nl-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_no') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-no-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_pl') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-pl-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_pt') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-pt-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_ro') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-ro-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_ru') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-ru-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_sk') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-sk-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_sv') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-sv-0.50-2-3.exe';
+		} else if ($dl_pkg == 'lang_uk') {
+			$fwd_url = 'http://ftp.gnu.org/gnu/aspell/w32/Aspell-uk-0.50-3-3.exe';
+		}
+	} else if ($dl_pkg == 'gtk') {
+		if (isset($_GET['gtk_version'])) {
+			$gtk_version = $_GET['gtk_version'];
+			if ($gtk_version == '2.16.6.0') {
+				$fwd_url = 'http://downloads.sourceforge.net/project/pidgin/GTK%2B%20for%20Windows/2.16.6.0/gtk-runtime-2.16.6.0.zip';
+			}
+		}
+	}
 }
 
-if (isset($_GET['dl_pkg']) && isset($dl_map[$_GET['dl_pkg']])) {
+if (isset($fwd_url)) {
     header("HTTP/1.1 302 Moved Temporarily");
-    header('Location: ' . $dl_map[$_GET['dl_pkg']]);
+    header('Location: ' . $fwd_url);
 } else {
     header("HTTP/1.1 400 Bad Request");
     header("Status: 400 Bad Request");


More information about the Commits mailing list