X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fspamcop%2Fsetup.php;h=912788bf619cfdab1b86ca5aae8a33b65c17eb15;hp=06cf3389e18021bda3ed9cc4cd80a3bdece5b9e7;hb=4b4abf93a9624311afef0c385023724ee46a2b60;hpb=057e9d6ec96f5fff399161f6ce175c47e1ca4e6f diff --git a/plugins/spamcop/setup.php b/plugins/spamcop/setup.php index 06cf3389..912788bf 100755 --- a/plugins/spamcop/setup.php +++ b/plugins/spamcop/setup.php @@ -1,141 +1,67 @@ \n"; - - /* - Catch situation when user use quick_email and does not update - preferences. User gets web_form link. If prefs are set to - quick_email format - they will be updated after clicking the link - */ - if (! $spamcop_quick_report && $spamcop_method=='quick_email') { - $spamcop_method = 'web_form'; - } - - if ($spamcop_method == 'web_form') { -?> - - _("SpamCop - Spam Reporting"), - 'url' => '../plugins/spamcop/options.php', - 'desc' => _("Help fight the battle against unsolicited email. SpamCop reads the spam email and determines the correct addresses to send complaints to. Quite fast, really smart, and easy to use."), - 'js' => false - ); +/** + * Show spamcop options block + * @access private + */ +function spamcop_options() { + include_once(SM_PATH . 'plugins/spamcop/functions.php'); + spamcop_options_function(); } -// When we send the email, we optionally trash it then too -function spamcop_while_sending() -{ - global $mailbox, $spamcop_delete, $spamcop_is_composing, $auto_expunge, - $username, $key, $imapServerAddress, $imapPort; - - if ($spamcop_delete) { - $imapConnection = sqimap_login($username, $key, $imapServerAddress, - $imapPort, 0); - sqimap_mailbox_select($imapConnection, $mailbox); - sqimap_messages_delete($imapConnection, $spamcop_is_composing, - $spamcop_is_composing, $mailbox); - if ($auto_expunge) - sqimap_mailbox_expunge($imapConnection, $mailbox, true); - } +/** + * Process messages submitted by email + * @access private + */ +function spamcop_while_sending() { + include_once(SM_PATH . 'plugins/spamcop/functions.php'); + spamcop_while_sending_function(); } - ?> \ No newline at end of file