commit df528597563355f2528cdcbeb8a47761d617093d
Author: Adam Olley <aolley@une-mdl-prod-util.(none)>
Date:   Tue Jun 21 08:49:41 2011 +0930

    UNE-140: Add proxy settings to spell check calls

diff --git a/lib/editor/tinymce/tiny_mce/3.3.9.2/plugins/spellchecker/classes/GoogleSpell.php b/lib/editor/tinymce/tiny_mce/3.3.9.2/plugins/spellchecker/classes/GoogleSpell.php
index 2305d20..74e2efc 100644
--- a/lib/editor/tinymce/tiny_mce/3.3.9.2/plugins/spellchecker/classes/GoogleSpell.php
+++ b/lib/editor/tinymce/tiny_mce/3.3.9.2/plugins/spellchecker/classes/GoogleSpell.php
@@ -51,6 +51,7 @@ class GoogleSpell extends SpellChecker {
 	}
 
 	function &_getMatches($lang, $str) {
+                global $CFG;
 		$server = "www.google.com";
 		$port = 443;
 		$path = "/tbproxy/spell?lang=" . $lang . "&hl=en";
@@ -79,6 +80,12 @@ class GoogleSpell extends SpellChecker {
 			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 			curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);
 			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
+                        if (isset($CFG->proxyhost) && $CFG->proxyhost != '') {
+                            curl_setopt($ch, CURLOPT_PROXY, $CFG->proxyhost);
+                        }
+                        if (isset($CFG->proxyport) && $CFG->proxyport != '') {
+                            curl_setopt($ch, CURLOPT_PROXYPORT, $CFG->proxyport); 
+                        }
 			$xml = curl_exec($ch);
 			curl_close($ch);
 		} else {
