X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fsquirrelspell%2Fmodules%2Fedit_dic.mod;h=7cf99e35fb65add1ceea9dd711538188a7ed36b6;hp=1d53633648bd15651f0f7316b876e87d5e0a8414;hb=48a1015b888d1150c6d9ac77594c6526e9e13902;hpb=fb0abd31769201a87860ec54c123e3a729a38518;ds=sidebyside diff --git a/plugins/squirrelspell/modules/edit_dic.mod b/plugins/squirrelspell/modules/edit_dic.mod index 1d536336..7cf99e35 100644 --- a/plugins/squirrelspell/modules/edit_dic.mod +++ b/plugins/squirrelspell/modules/edit_dic.mod @@ -1,68 +1,113 @@ ($Author$) + * @version $Date + */ - /** - ** EDIT_DIC.MOD.PHP -- Squirrelspell module - ** - ** Copyright (c) 1999-2002 The SquirrelMail development team - ** Licensed under the GNU GPL. For full terms see the file COPYING. - ** - ** This module handles the encryption/decryption of the user dictionary - ** if the user so chooses from the options page. - ** - ** $Id$ - **/ - - // fidian, you owe me a pack of Guinness! :) - global $color; - $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($words); - for ($i=0; $i'. - '' . - "\n"; - } - } - // Check if all dictionaries were empty. - if (!$msg) { - $msg = '

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

'; - } else { - $msg .= '
" . - sprintf( _("%s dictionary"), $langs[$i] ) . '
'. - '
'. - ''. - ''. - ''. - ''. - "
\n"; - $words_ary=explode("\n", $lang_words); - 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 .= " $words_ary[$j]
"; - } - $msg .= '
". - ''. - '

'. - "
'; - } - sqspell_makePage(_("Edit your Personal Dictionary"), null, $msg); +global $color; +/** + * Get the user dictionary and see if it's empty or not. + */ +$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"; + /** + * Get how many dictionaries this user has defined. + */ + $langs=sqspell_getSettings($words); + for ($i=0; $i' + . '' + . "\n"; } + } + /** + * Check if all dictionaries were empty. + */ + if (!$msg) { + $msg = '

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

'; + } else { + $msg .= '
" + . sprintf( _("%s dictionary"), $langs[$i] ) . '
' + . '
' + . '' + . '' + . '' + . '' + . "
\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 .= " $words_ary[$j]
"; + } + $msg .= '
" + . '' + . '

' + . "
'; + } + sqspell_makePage(_("Edit your Personal Dictionary"), null, $msg); +} + +/** + * For Emacs weenies: + * Local variables: + * mode: php + * End: + */ ?>