MDL-38867 remove Google spell checking option

This commit is contained in:
Petr Škoda
2013-07-19 09:32:35 +02:00
parent 1a449aa5e7
commit 7831560995
3 changed files with 12 additions and 13 deletions
@@ -28,25 +28,18 @@ require('../../../../../config.php');
// General settings
$engine = get_config('tinymce_spellchecker', 'spellengine');
if (!$engine) {
$engine = 'GoogleSpell';
if (!$engine or $engine === 'GoogleSpell') {
$engine = 'PSpell';
}
$config['general.engine'] = $engine;
// GoogleSpell settings
$config['GoogleSpell.proxyhost'] = isset($CFG->proxyhost) ? $CFG->proxyhost : '';
$config['GoogleSpell.proxyport'] = isset($CFG->proxyport) ? $CFG->proxyport : '';
$config['GoogleSpell.proxytype'] = isset($CFG->proxytype) ? $CFG->proxytype : 'HTML';
$config['GoogleSpell.proxyuser'] = isset($CFG->proxyuser) ? $CFG->proxyuser : '';
$config['GoogleSpell.proxypassword'] = isset($CFG->proxypassword) ? $CFG->proxypassword : '';
if ($config['general.engine'] === 'PSpell' || $config['general.engine'] === 'PSpellShell') {
if ($config['general.engine'] === 'PSpell') {
// PSpell settings
$config['PSpell.mode'] = PSPELL_FAST;
$config['PSpell.spelling'] = "";
$config['PSpell.jargon'] = "";
$config['PSpell.encoding'] = "";
} else if ($config['general.engine'] === 'PSpellShell') {
// PSpellShell settings
$config['PSpellShell.mode'] = PSPELL_FAST;
$config['PSpellShell.aspell'] = $CFG->aspellpath;
@@ -32,6 +32,12 @@ class tinymce_spellchecker extends editor_tinymce_plugin {
array $options = null) {
global $CFG;
// Check some speller is configured.
$engine = $this->get_config('spellengine', '');
if (!$engine or $engine === 'GoogleSpell') {
return;
}
// Check at least one language is supported.
$spelllanguagelist = $this->get_config('spelllanguagelist', '');
if ($spelllanguagelist !== '') {
@@ -26,11 +26,11 @@ defined('MOODLE_INTERNAL') || die;
if ($ADMIN->fulltree) {
$options = array(
''=>get_string('none'),
'PSpell'=>'PSpell',
'GoogleSpell'=>'Google Spell',
'PSpellShell'=>'PSpellShell');
$settings->add(new admin_setting_configselect('tinymce_spellchecker/spellengine',
get_string('spellengine', 'admin'), '', 'GoogleSpell', $options));
get_string('spellengine', 'admin'), '', '', $options));
$settings->add(new admin_setting_configtextarea('tinymce_spellchecker/spelllanguagelist',
get_string('spelllanguagelist', 'admin'), '',
'+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,' .