/plugins/spellcheck/functions.phpfunctions.php - main plugin functions Copyright (c) 1999-2006 The SquirrelMail Project Team Copyright (c) 2006-2008 The NaSMail Project Licensed under the GNU GPL. For full terms see the file COPYING.
Original plugin (SquirrelSpell) was written by Konstantin Riabitsev <icon@duke.edu>. This plugin version is maintained by The NaSMail Project developers.
include_once
(SM_PATH.'plugins/spellcheck/config.php')
(line 21)
load plugin configuration
sqspell_check_version (line 723)
Used to check internal version of SquirrelSpell dictionary
sqspell_ckMOD (line 707)
This function checks for security attacks. A $MOD variable is
provided in the QUERY_STRING and includes one of the files from the modules directory ($MOD.mod). See if someone is trying to get out of the modules directory by providing dots, unicode strings, or slashes.
sqspell_crypto (line 228)
Encryption function used by plugin
This function does the encryption and decryption of the user dictionary. It is only available when PHP is compiled with mcrypt support (--with-mcrypt). See doc/CRYPTO for more information.
sqspell_crypto_old (line 164)
Encryption function used by plugin (old format)
This function does the encryption and decryption of the user dictionary. It is only available when PHP is compiled with mcrypt support (--with-mcrypt). See doc/CRYPTO for more information.
sqspell_deleteWords (line 661)
Deletes user's dictionary
Function was modified in 1.5.1 (sqspell 0.5). Older function is suffixed with '_old'
sqspell_deleteWords_old (line 670)
Deletes user's dictionary when it is corrupted.
sqspell_getLang (line 403)
Get user dictionary for selected language Function was modified in 1.5.1 (sqspell 0.5).
Older function is suffixed with '_old'
sqspell_getLang_old (line 471)
Get user's dictionary (old format)
This function returns only user-defined dictionary words that correspond to the requested language.
sqspell_getSettings (line 314)
gets list of available dictionaries from user's prefs.
Function was modified in 1.5.1 (sqspell 0.5). Older function is suffixed with '_old'
sqspell_getSettings_old (line 357)
Get list of enabled languages.
Right now it just returns an array with the dictionaries available to the user for spell-checking. It will probably do more in the future, as features are added.
sqspell_getWords_old (line 502)
Saves user's dictionary (old format)
This function operates the user dictionary. If the format is clear-text, then it just reads the file and returns it. However, if the file is encrypted (well, "garbled"), then it tries to decrypt it, checks whether the decryption was successful, troubleshoots if not, then returns the clear-text dictionary to the app.
sqspell_handle_crypt_panic (line 743)
Displays form that allows to enter different password for dictionary decryption.
If language is not set, function provides form to handle older dictionary files.
sqspell_makeDummy (line 689)
Creates an empty user dictionary for the sake of saving prefs or whatever.
sqspell_makePage (line 65)
This function is the GUI wrapper for the options page.
sqspell_makeWindow (line 122)
Function similar to the one above. This one is a general wrapper for the Squirrelspell pop-up window. It's called form nearly everywhere, except the check_me module, since that one is highly customized.
sqspell_saveSettings (line 340)
Saves user's language preferences
sqspell_upgradeWordsFile (line 291)
This function transparently upgrades the 0.2 dictionary format to the 0.3 format, since user-defined languages have been added in 0.3 and the new format keeps user dictionaries selection in the file.
This function will be retired soon, as it's been a while since anyone has been using SquirrelSpell-0.2.
sqspell_writeWords (line 579)
Saves user's dictionary Function was replaced in 1.5.1 (sqspell 0.5).
Older function is suffixed with '_old'
sqspell_writeWords_old (line 612)
Writes user dictionary into the $username.words file, then changes mask to 0600. If encryption is needed -- does that, too.
squirrelspell_upgrade_function (line 29)
Upgrade dictionaries (internal function)
Transparently upgrades user's dictionaries when message listing is loaded
Documentation generated on Sun, 22 Nov 2009 17:36:34 +0200 by phpDocumentor 1.4.3