www: 7a10243d: Update the win32 spellcheck downloading ...

datallah at pidgin.im datallah at pidgin.im
Tue Feb 28 22:20:47 EST 2012


----------------------------------------------------------------------
Revision: 7a10243d1144059b469193b2634c395d75b04a04
Parent:   a396cae8c45fcf88939322cf8698dc974832b08c
Author:   datallah at pidgin.im
Date:     02/28/12 22:16:53
Branch:   im.pidgin.www
URL: http://d.pidgin.im/viewmtn/revision/info/7a10243d1144059b469193b2634c395d75b04a04

Changelog: 

Update the win32 spellcheck downloading to go through the redirector php script
on pidgin.im.  Currently this will just forward to a oo.o mirror that still has
the dictionaries available, but it also gives us the flexibility handle such
situations better in the future.

Fixes #14612

Changes against parent a396cae8c45fcf88939322cf8698dc974832b08c

  patched  htdocs/win32/download_redir.php

-------------- next part --------------
============================================================
--- htdocs/win32/download_redir.php	6dcfacca89ee21efeed50fd94367e1799cf085d8
+++ htdocs/win32/download_redir.php	e88fdda15756904371871c6d4bdfb9fa6ae3a65b
@@ -54,6 +54,17 @@ if (isset($_GET['dl_pkg'])) {
 		$fwd_url = 'http://downloads.sourceforge.net/project/pidgin/GTK%2B%20for%20Windows/' . $_GET['gtk_version'] . '/gtk-runtime-' . $_GET['gtk_version'] . '.zip';
 	} else if ($dl_pkg == 'dbgsym') {
 		$fwd_url = 'http://downloads.sourceforge.net/project/pidgin/Pidgin/' . $_GET['version'] . '/pidgin-' . $_GET['version'] . '-dbgsym.zip';
+	} else if ($dl_pkg == 'oo_dict') {
+		$lang = $_GET['lang'];
+		$lang_file = $_GET['lang_file'];
+		//Temporarily forward to a mirror that's still up - later we can do something better
+		$base_urls = array('http://download.services.openoffice.org/files/contrib/dictionaries/'
+			//'http://mirror.sit.wisc.edu/pub/openoffice/contrib/dictionaries/',
+			//'http://ftp.ntu.edu.tw/ftp/OpenOffice/contrib/dictionaries/',
+			//'http://ftp.sunet.se/pub/Office/OpenOffice.org/contrib/dictionaries/'
+		);
+		$idx = rand(0, count($base_urls) - 1);
+		$fwd_url = $base_urls[$idx] . $lang_file;
 	}
 }
 


More information about the Commits mailing list