• Модуль: fileman
  • Путь к файлу: ~/bitrix/modules/fileman/classes/general/spellchecker.php
  • Класс: CSpellchecker
  • Вызов: CSpellchecker::addWord
function addWord($word = '')
{
	//pspell
	if ($this->pspell)
	{
		if (!pspell_add_to_personal($this->pspell_link, $word) || !pspell_save_wordlist($this->pspell_link))
		{
			return false;
		}
	}
	//custom
//		elseif($this->custom_spell)
//		{
//			if ($this->lang == 'ru')
//			{
//				$word = $APPLICATION->ConvertCharset($word, "UTF-8", "Windows-1251");
//			}
//			$path = $this->dic_path.'/dics/'.$this->lang.'_';
//
//			$letter = $this->codeLetter(strtolower($word{0}));
//			$path .= $letter.'.dic';
//			if (!$handle = fopen($path, 'a'))
//				return false;
//			if (fwrite($handle, $word."n") === FALSE)
//				return false;
//			fclose($handle);
//			return true;
//		}
}