|
@@ -4,15 +4,15 @@
|
|
* -------------
|
|
* -------------
|
|
* Squirrelspell module
|
|
* Squirrelspell module
|
|
*
|
|
*
|
|
- * Copyright (c) 1999-2003 The SquirrelMail development team
|
|
|
|
|
|
+ * Copyright (c) 1999-2004 The SquirrelMail development team
|
|
* Licensed under the GNU GPL. For full terms see the file COPYING.
|
|
* Licensed under the GNU GPL. For full terms see the file COPYING.
|
|
*
|
|
*
|
|
* This module lets the user edit his/her personal dictionary.
|
|
* This module lets the user edit his/her personal dictionary.
|
|
*
|
|
*
|
|
- * $Id$
|
|
|
|
- *
|
|
|
|
- * @author Konstantin Riabitsev <icon@duke.edu> ($Author$)
|
|
|
|
- * @version $Date
|
|
|
|
|
|
+ * @author Konstantin Riabitsev <icon@duke.edu>
|
|
|
|
+ * @version $Id$
|
|
|
|
+ * @package plugins
|
|
|
|
+ * @subpackage squirrelspell
|
|
*/
|
|
*/
|
|
|
|
|
|
global $color;
|
|
global $color;
|
|
@@ -26,8 +26,8 @@ if (!$words){
|
|
* Neo: "So are you."
|
|
* Neo: "So are you."
|
|
*/
|
|
*/
|
|
sqspell_makePage(_("Personal Dictionary"), null,
|
|
sqspell_makePage(_("Personal Dictionary"), null,
|
|
- '<p>' . _("No words in your personal dictionary.")
|
|
|
|
- . '</p>');
|
|
|
|
|
|
+ '<p>' . _("No words in your personal dictionary.")
|
|
|
|
+ . '</p>');
|
|
} else {
|
|
} else {
|
|
/**
|
|
/**
|
|
* We're loaded with booty.
|
|
* We're loaded with booty.
|
|
@@ -52,18 +52,18 @@ if (!$words){
|
|
* "header" message.
|
|
* "header" message.
|
|
*/
|
|
*/
|
|
if (!isset($msg) || !$msg) {
|
|
if (!isset($msg) || !$msg) {
|
|
- $msg = $pre_msg;
|
|
|
|
|
|
+ $msg = $pre_msg;
|
|
}
|
|
}
|
|
$msg .= "<tr bgcolor=\"$color[0]\" align=\"center\"><th>"
|
|
$msg .= "<tr bgcolor=\"$color[0]\" align=\"center\"><th>"
|
|
- . sprintf( _("%s dictionary"), $langs[$i] ) . '</th></tr>'
|
|
|
|
- . '<tr><td align="center">'
|
|
|
|
- . '<form method="post">'
|
|
|
|
- . '<input type="hidden" name="MOD" value="forget_me" />'
|
|
|
|
- . '<input type="hidden" name="sqspell_use_app" value="'
|
|
|
|
- . $langs[$i] . '" />'
|
|
|
|
- . '<table border="0" width="95%" align="center">'
|
|
|
|
- . '<tr>'
|
|
|
|
- . "<td valign=\"top\">\n";
|
|
|
|
|
|
+ . sprintf( _("%s dictionary"), $langs[$i] ) . '</th></tr>'
|
|
|
|
+ . '<tr><td align="center">'
|
|
|
|
+ . '<form method="post">'
|
|
|
|
+ . '<input type="hidden" name="MOD" value="forget_me" />'
|
|
|
|
+ . '<input type="hidden" name="sqspell_use_app" value="'
|
|
|
|
+ . $langs[$i] . '" />'
|
|
|
|
+ . '<table border="0" width="95%" align="center">'
|
|
|
|
+ . '<tr>'
|
|
|
|
+ . "<td valign=\"top\">\n";
|
|
$words_ary=explode("\n", $lang_words);
|
|
$words_ary=explode("\n", $lang_words);
|
|
/**
|
|
/**
|
|
* There are two lines we need to remove:
|
|
* There are two lines we need to remove:
|
|
@@ -77,26 +77,26 @@ if (!$words){
|
|
* columns.
|
|
* columns.
|
|
*/
|
|
*/
|
|
for ($j=0; $j<sizeof($words_ary); $j++){
|
|
for ($j=0; $j<sizeof($words_ary); $j++){
|
|
- if ($j==intval(sizeof($words_ary)/3)
|
|
|
|
- || $j==intval(sizeof($words_ary)/3*2)){
|
|
|
|
- $msg .= "</td><td valign=\"top\">\n";
|
|
|
|
- }
|
|
|
|
- $msg .= "<input type=\"checkbox\" name=\"words_ary[]\" "
|
|
|
|
- . 'value="'.htmlspecialchars($words_ary[$j]). '" /> '
|
|
|
|
- . htmlspecialchars($words_ary[$j]) . "<br />\n";
|
|
|
|
|
|
+ if ($j==intval(sizeof($words_ary)/3)
|
|
|
|
+ || $j==intval(sizeof($words_ary)/3*2)){
|
|
|
|
+ $msg .= "</td><td valign=\"top\">\n";
|
|
|
|
+ }
|
|
|
|
+ $msg .= "<input type=\"checkbox\" name=\"words_ary[]\" "
|
|
|
|
+ . 'value="'.htmlspecialchars($words_ary[$j]). '" /> '
|
|
|
|
+ . htmlspecialchars($words_ary[$j]) . "<br />\n";
|
|
}
|
|
}
|
|
$msg .= '</td></tr></table></td></tr>'
|
|
$msg .= '</td></tr></table></td></tr>'
|
|
- . "<tr bgcolor=\"$color[0]\" align=\"center\"><td>"
|
|
|
|
- . '<input type="submit" value="' . _("Delete checked words")
|
|
|
|
- . '" /></form>'
|
|
|
|
- . '</td></tr><tr><td><hr />'
|
|
|
|
- . "</td></tr>\n";
|
|
|
|
|
|
+ . "<tr bgcolor=\"$color[0]\" align=\"center\"><td>"
|
|
|
|
+ . '<input type="submit" value="' . _("Delete checked words")
|
|
|
|
+ . '" /></form>'
|
|
|
|
+ . '</td></tr><tr><td><hr />'
|
|
|
|
+ . "</td></tr>\n";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* Check if all dictionaries were empty.
|
|
* Check if all dictionaries were empty.
|
|
*/
|
|
*/
|
|
- if (!$msg) {
|
|
|
|
|
|
+ if (! isset($msg)) {
|
|
$msg = '<p>' . _("No words in your personal dictionary.") . '</p>';
|
|
$msg = '<p>' . _("No words in your personal dictionary.") . '</p>';
|
|
} else {
|
|
} else {
|
|
$msg .= '</table>';
|
|
$msg .= '</table>';
|