X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Ffilters%2Fspamoptions.php;h=a31ebaa5540de191898da2eee1a39a366c57c318;hp=2fc1706e4d4374883bba717f20e15f4b69230966;hb=326727cf39b3c1ba7b8dc2cc94b44a052734b78a;hpb=3c66c567ff1ec35d730b15368cf9563f1979496e diff --git a/plugins/filters/spamoptions.php b/plugins/filters/spamoptions.php index 2fc1706e..a31ebaa5 100644 --- a/plugins/filters/spamoptions.php +++ b/plugins/filters/spamoptions.php @@ -1,9 +1,6 @@ $Value) { $input = $spam_filters[$Key]['prefname'] . '_set'; - if ( isset( $_POST[$input] ) ) { - setPref( $data_dir, $username, $spam_filters[$Key]['prefname'], - $_POST[$input]); + if ( sqgetGlobalVar($input,$input_key,SQ_POST) ) { + setPref( $data_dir, $username, $spam_filters[$Key]['prefname'],$input_key); } else { removePref($data_dir, $username, $spam_filters[$Key]['prefname']); } @@ -73,12 +91,12 @@ echo html_tag( 'table', 'center', $color[0], 'width="95%" border="0" cellpadding="2" cellspacing="0"' ); if ($SpamFilters_YourHop == ' ') { - echo '
' . + echo '
' . html_tag( 'div', '' . - _("WARNING! Tell your admin to set the SpamFilters_YourHop variable") . + sprintf(_("WARNING! Tell the adminstrator to set the %s variable."), '"SpamFilters_YourHop"') . '' , 'center' ) . - '
'; + '
'; } @@ -96,7 +114,7 @@ if (isset($action) && $action == 'spam') { } } - echo '
'. + echo ''. '
'. html_tag( 'table', '', '', '', 'width="85%" border="0" cellpadding="2" cellspacing="0"' ) . html_tag( 'tr' ) . @@ -123,21 +141,21 @@ if (isset($action) && $action == 'spam') { ''. ''. ''. html_tag( 'tr', html_tag( 'td', ' ' ) . html_tag( 'td', - _("The more messages you scan, the longer it takes. I would suggest that you scan only new messages. If you make a change to your filters, I would set it to scan all messages, then go view my INBOX, then come back and set it to scan only new messages. That way, your new spam filters will be applied and you'll scan even the spam you read with the new filters.") , + _("The more messages scanned, the longer it takes. It's recommended to scan unread messages only. If a change to the filters is made, it's recommended to set it to scan all messages, then go view the INBOX, then come back and set it to scan unread messages only. That way, the new spam filters will be applied and even the spam you didn't catch with the old filters will be scanned.") , 'left' ) ); @@ -147,13 +165,13 @@ if (isset($action) && $action == 'spam') { echo html_tag( 'tr' ) . html_tag( 'th', $Key, 'right', '', 'nowrap' ) ."\n" . html_tag( 'td' ) . - ' - '; + echo ' /> - '; if ($spam_filters[$Key]['link']) { echo '', 'center', '', 'colspan="2"' ) + html_tag( 'td', '', 'center', '', 'colspan="2"' ) ) . "\n" . ''. '
'. ''; - -} - -if (! isset($_GET['action']) || $_GET['action'] != 'spam') { - +} else { + // action is not set or action is not spam echo html_tag( 'p', '', 'center' ) . '[
' . _("Edit") . ']' . - ' - [' . _("Done") . ']

'; - printf( _("Spam is sent to %s"), ($filters_spam_folder?$filters_spam_folder:_("[not set yet]") ) ); - echo '
'; - printf( _("Spam scan is limited to %s"), (($filters_spam_scan == 'new')?_("New Messages Only"):_("All Messages") ) ); + ' - [' . _("Done") . ']

'; + printf( _("Spam is sent to %s."), ($filters_spam_folder?''.imap_utf7_decode_local($filters_spam_folder).'':'['._("not set yet").']' ) ); + echo '
'; + printf( _("Spam scan is limited to %s."), '' . ( ($filters_spam_scan == 'new')?_("Unread messages only"):_("All Messages") ) . '' ); echo '

'. - ""; + '
\n"; $spam_filters = load_spam_filters(); @@ -220,5 +235,5 @@ if (! isset($_GET['action']) || $_GET['action'] != 'spam') { } echo '
'; } - ?> +