X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fsquirrelspell%2Fsqspell_functions.php;h=0213c4f1b537f5f56b67a118cf583ec20e9d3acc;hp=bdbdd9f4683c7191b3c3282f3fdb7451d26c7b73;hb=91e0dccca7b2452d8b450791cae3aa4125e8889e;hpb=0f610dca6fd52a148e290f79cdfcfc572998b475
diff --git a/plugins/squirrelspell/sqspell_functions.php b/plugins/squirrelspell/sqspell_functions.php
index bdbdd9f4..0213c4f1 100644
--- a/plugins/squirrelspell/sqspell_functions.php
+++ b/plugins/squirrelspell/sqspell_functions.php
@@ -1,6 +1,6 @@
format. This
* allows to separate javascript from the rest of the
* plugin and place it into the js/ directory.
@@ -34,12 +34,12 @@ function sqspell_makePage($title, $scriptsrc, $body){
$MOD = 'options_main';
}
- displayPageHeader($color, 'None');
+ displayPageHeader($color, 'None');
echo "
\n";
/**
* Check if we need to link in a script.
*/
- if($scriptsrc) {
+ if($scriptsrc) {
echo "\n";
}
echo html_tag( 'table', '', 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) . "\n"
@@ -56,7 +56,7 @@ function sqspell_makePage($title, $scriptsrc, $body){
* Generate a nice "Return to Options" link, unless this is the
* starting page.
*/
- if ($MOD != "options_main"){
+ if ($MOD != "options_main"){
echo html_tag( 'tr', "\n" .
html_tag( 'td', '
' . "\n" - . '' . "\n" - . html_tag( 'p', "\n" . - '' , - 'center' ) . "\n" - . '' . "\n"; + . '
' . "\n" + . '' . "\n" + . html_tag( 'p', "\n" . + '' , + 'center' ) . "\n" + . '' . "\n"; /** * Add some string vars so they can be i18n'd. */ $msg .= "\n"; + . "var ui_choice = \"" . _("You must make a choice") ."\";\n" + . "var ui_candel = \"" . _("You can either delete your dictionary or type in the old password. Not both.") . "\";\n" + . "var ui_willdel = \"" . _("This will delete your personal dictionary file. Proceed?") . "\";\n" + . "//-->\n"; /** * See if this happened in the pop-up window or when accessing - * the SpellChecker options page. + * the SpellChecker options page. * This is a dirty solution, I agree. TODO: make this prettier. */ global $SCRIPT_NAME; if (strstr($SCRIPT_NAME, "sqspell_options")){ - sqspell_makePage(_("Error Decrypting Dictionary"), - "decrypt_error.js", $msg); + sqspell_makePage(_("Error Decrypting Dictionary"), + "decrypt_error.js", $msg); } else { - sqspell_makeWindow(null, _("Error Decrypting Dictionary"), - "decrypt_error.js", $msg); + sqspell_makeWindow(null, _("Error Decrypting Dictionary"), + "decrypt_error.js", $msg); } exit; } else { /** - * OK! Phew. Set the encryption flag to true so we can later on + * OK! Phew. Set the encryption flag to true so we can later on * encrypt it again before saving to HDD. */ $SQSPELL_CRYPTO=true; } } else { /** - * No encryption is/was used. Set $SQSPELL_CRYPTO to false, + * No encryption is/was used. Set $SQSPELL_CRYPTO to false, * in case we have to save the dictionary later. */ $SQSPELL_CRYPTO=false; @@ -428,7 +428,7 @@ function sqspell_getWords(){ } return $words; } - + /** * Writes user dictionary into the $username.words file, then changes mask * to 0600. If encryption is needed -- does that, too. @@ -479,7 +479,7 @@ function sqspell_writeWords($words){ fclose($fp); chmod($SQSPELL_WORDS_FILE, 0600); } - + function sqspell_deleteWords(){ /** * So I open the door to my enemies, @@ -497,12 +497,12 @@ function sqspell_deleteWords(){ * whatever. * * @return The template to use when storing the user dictionary. - */ + */ function sqspell_makeDummy(){ global $SQSPELL_VERSION, $SQSPELL_APP_DEFAULT; $words = "# SquirrelSpell User Dictionary $SQSPELL_VERSION\n" - . "# Last Revision: " . date('Y-m-d') - . "\n# LANG: $SQSPELL_APP_DEFAULT\n# End\n"; + . "# Last Revision: " . date('Y-m-d') + . "\n# LANG: $SQSPELL_APP_DEFAULT\n# End\n"; return $words; } @@ -517,10 +517,10 @@ function sqspell_makeDummy(){ * @return void, since it bails out with an access error if needed. */ function sqspell_ckMOD($rMOD){ - if (strstr($rMOD, '.') - || strstr($rMOD, '/') + if (strstr($rMOD, '.') + || strstr($rMOD, '/') || strstr($rMOD, '%') - || strstr($rMOD, "\\")){ + || strstr($rMOD, "\\")){ echo _("Cute."); exit; } @@ -528,7 +528,7 @@ function sqspell_ckMOD($rMOD){ /** * SquirrelSpell version. Don't modify, since it identifies the format - * of the user dictionary files and messing with this can do ugly + * of the user dictionary files and messing with this can do ugly * stuff. :) */ $SQSPELL_VERSION="v0.3.8";