X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Ffilters%2Ffilters.php;h=f10e0646bb267b737e86d4f2399325f71b7c4ecd;hb=6e515418431c0a99f10705da21366fe7093f95b6;hp=23fb688408362b7462c07179a94bbc248cb65b2e;hpb=24afb0e926a7cf0e6a99f8e8e8bf33c678afee1c;p=squirrelmail.git diff --git a/plugins/filters/filters.php b/plugins/filters/filters.php index 23fb6884..f10e0646 100644 --- a/plugins/filters/filters.php +++ b/plugins/filters/filters.php @@ -192,10 +192,8 @@ function filters_bulkquery($filters, $IPs) { */ function start_filters($hook_args) { global $imapServerAddress, $imapPort, $imap_stream, $imapConnection, - $UseSeparateImapConnection, $AllowSpamFilters, $filter_inbox_count; - - sqgetGlobalVar('username', $username, SQ_SESSION); - sqgetGlobalVar('key', $key, SQ_COOKIE); + $UseSeparateImapConnection, $AllowSpamFilters, $filter_inbox_count, + $username; /** * check hook that calls filtering. If filters are called by right_main_after_header, @@ -230,7 +228,7 @@ function start_filters($hook_args) { // Also check if we are forced to use a separate IMAP connection if ((!isset($imap_stream) && !isset($imapConnection)) || $UseSeparateImapConnection ) { - $stream = sqimap_login($username, $key, $imapServerAddress, + $stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10); $previously_connected = false; } else if (isset($imapConnection)) { @@ -393,8 +391,8 @@ function filter_search_and_delete($imap_stream, $where, $what, $where_to, $user_ sqimap_msgs_list_move ($imap_stream, $ids, $where_to, false); } } elseif ($response != 'OK') { + $query = $search_str . "\r\n".$what ."\r\n"; if ($response == 'NO') { - $query = $search_str . "\r\n".$what ."\r\n"; if (strpos($message,'BADCHARSET') !== false || strpos($message,'character') !== false) { sqm_trigger_imap_error('SQM_IMAP_BADCHARSET',$query, $response, $message); @@ -953,5 +951,3 @@ function do_error($string) { echo $string; echo "

\n"; } - -?> \ No newline at end of file