X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Ffilters%2Fspamoptions.php;h=016c8dc589bd3a4b4dd2b33a80e44d142c544fca;hb=c435f076fe6b5b58e09ae19a8e216f37b069d802;hp=2cc694b44a36175c600c71532d1bbeb29f199cbf;hpb=41100fce5421f43c40c4db946fe01b4f31e34913;p=squirrelmail.git
diff --git a/plugins/filters/spamoptions.php b/plugins/filters/spamoptions.php
index 2cc694b4..016c8dc5 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 administrator to set the %s variable."), '"SpamFilters_YourHop"') .
'' ,
'center' ) .
- '
';
+ '
';
}
@@ -86,7 +104,9 @@ if (isset($action) && $action == 'spam') {
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
$boxes = sqimap_mailbox_list($imapConnection);
sqimap_logout($imapConnection);
- for ($i = 0; $i < count($boxes) && $filters_spam_folder == ''; $i++) {
+ $numboxes = count($boxes);
+
+ for ($i = 0; $i < $numboxes && $filters_spam_folder == ''; $i++) {
if ((isset($boxes[$i]['flags'][0]) && $boxes[$i]['flags'][0] != 'noselect') &&
(isset($boxes[$i]['flags'][1]) && $boxes[$i]['flags'][1] != 'noselect') &&
(isset($boxes[$i]['flags'][2]) && $boxes[$i]['flags'][2] != 'noselect')) {
@@ -94,25 +114,18 @@ if (isset($action) && $action == 'spam') {
}
}
- echo '