X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fsquirrelspell%2Fmodules%2Fedit_dic.mod;h=238ad7b7ecd9649ed98168645a6ab00dcc09b3dd;hb=7af343f176b34839e17d03e5f2ea9dc45b56f6d2;hp=0c8e18bb1d3c6e075d2a51929ecf1c33365550cb;hpb=91e0dccca7b2452d8b450791cae3aa4125e8889e;p=squirrelmail.git diff --git a/plugins/squirrelspell/modules/edit_dic.mod b/plugins/squirrelspell/modules/edit_dic.mod index 0c8e18bb..238ad7b7 100644 --- a/plugins/squirrelspell/modules/edit_dic.mod +++ b/plugins/squirrelspell/modules/edit_dic.mod @@ -1,108 +1,87 @@ + * @author Konstantin Riabitsev + * @copyright © 1999-2006 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package plugins * @subpackage squirrelspell */ global $color; + +$pre_msg = '

' + . _("Please check any words you wish to delete from your dictionary.") + . "

\n"; +$pre_msg .= "\n"; + /** - * Get the user dictionary and see if it's empty or not. + * Get how many dictionaries this user has defined. */ -$words=sqspell_getWords(); -if (!$words){ - /** - * Agt. Smith: "You're empty." - * Neo: "So are you." - */ - sqspell_makePage(_("Personal Dictionary"), null, - '

' . _("No words in your personal dictionary.") - . '

'); -} else { - /** - * We're loaded with booty. - */ - $pre_msg = '

' - . _("Please check any words you wish to delete from your dictionary.") - . "

\n"; - $pre_msg .= "
\n"; +$langs=sqspell_getSettings(); + +foreach ($langs as $lang) { /** - * Get how many dictionaries this user has defined. + * Get all words from this language dictionary. */ - $langs=sqspell_getSettings($words); - for ($i=0; $i' - . '' + . "\n"; } - /** - * Check if all dictionaries were empty. - */ - if (! isset($msg)) { - $msg = '

' . _("No words in your personal dictionary.") . '

'; - } else { - $msg .= '
" - . sprintf( _("%s dictionary"), $langs[$i] ) . '
' - . '
' - . '' - . '' - . '' - . '' - . "' + . '' - . "\n"; + $msg .= "
\n"; } + $msg .= '
\n"; - $words_ary=explode("\n", $lang_words); - /** - * There are two lines we need to remove: - * 1st: # Language - * last: # End - */ - array_pop($words_ary); - array_shift($words_ary); - /** - * Do some fancy stuff to separate the words into three - * columns. - */ - for ($j=0; $j\n"; - } - $msg .= " ' - . htmlspecialchars($words_ary[$j]) . "
\n"; + if (!isset($msg) || !$msg) { + $msg = $pre_msg; + } + $msg .= "
" + . sprintf( _("%s dictionary"), $lang ) . '
' + . '' + . '' + . '' + . '' + . '' + . "
\n"; + /** + * Do some fancy stuff to separate the words into three + * columns. + */ + for ($j=0; $j\n"; } - $msg .= '
" - . '' - . '

' - . "
" + . '' + . '

' + . "
'; - } - sqspell_makePage(_("Edit your Personal Dictionary"), null, $msg); } +/** + * Check if all dictionaries were empty. + */ +if (! isset($msg)) { + $msg = '

' . _("No words in your personal dictionary.") . '

'; +} else { + $msg .= ''; +} +sqspell_makePage(_("Edit your Personal Dictionary"), null, $msg); /** * For Emacs weenies: @@ -111,5 +90,3 @@ if (!$words){ * End: * vim: syntax=php */ - -?> \ No newline at end of file