Skip to content

Commit

Permalink
MDL-29081 add support for proxy in TinyMCE GoogleSpell plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Sep 10, 2011
1 parent 3e48e0b commit 57638f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Expand Up @@ -79,6 +79,12 @@ function &_getMatches($lang, $str) {
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
if (!empty($this->_config['GoogleSpell.proxy'])) {
curl_setopt($ch, CURLOPT_PROXY, $this->_config['GoogleSpell.proxy']);
if (!empty($this->_config['GoogleSpell.proxyport'])) {
curl_setopt($ch, CURLOPT_PROXYPORT, $this->_config['GoogleSpell.proxyport']);
}
}
$xml = curl_exec($ch);
curl_close($ch);
} else {
Expand Down
Expand Up @@ -14,6 +14,10 @@
//$config['general.engine'] = 'PSpellShell';
//$config['general.remote_rpc_url'] = 'http://some.other.site/some/url/rpc.php';

// GoogleSpell settings
$config['GoogleSpell.proxy'] = isset($CFG->proxyhost) ? $CFG->proxyhost : '';
$config['GoogleSpell.proxyport'] = isset($CFG->proxyport) ? $CFG->proxyport : '';

if ($config['general.engine'] === 'PSpell' or $config['general.engine'] === 'PSpellShell') {
// PSpell settings
$config['PSpell.mode'] = PSPELL_FAST;
Expand Down

0 comments on commit 57638f2

Please sign in to comment.