|
|
|
@ -57,13 +57,6 @@ class rcube_spellchecker
|
|
|
|
|
$this->engine = $this->rc->config->get('spellcheck_engine', 'googie');
|
|
|
|
|
$this->lang = $lang ? $lang : 'en';
|
|
|
|
|
|
|
|
|
|
if ($this->engine == 'pspell' && !extension_loaded('pspell')) {
|
|
|
|
|
rcube::raise_error(array(
|
|
|
|
|
'code' => 500, 'type' => 'php',
|
|
|
|
|
'file' => __FILE__, 'line' => __LINE__,
|
|
|
|
|
'message' => "Pspell extension not available"), true, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->options = array(
|
|
|
|
|
'ignore_syms' => $this->rc->config->get('spellcheck_ignore_syms'),
|
|
|
|
|
'ignore_nums' => $this->rc->config->get('spellcheck_ignore_nums'),
|
|
|
|
@ -321,6 +314,16 @@ class rcube_spellchecker
|
|
|
|
|
private function _pspell_init()
|
|
|
|
|
{
|
|
|
|
|
if (!$this->plink) {
|
|
|
|
|
if (!extension_loaded('pspell')) {
|
|
|
|
|
$this->error = "Pspell extension not available";
|
|
|
|
|
rcube::raise_error(array(
|
|
|
|
|
'code' => 500, 'type' => 'php',
|
|
|
|
|
'file' => __FILE__, 'line' => __LINE__,
|
|
|
|
|
'message' => $this->error), true, false);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->plink = pspell_new($this->lang, null, null, RCMAIL_CHARSET, PSPELL_FAST);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|