X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fspamcop%2Fsetup.php;h=fbb2d4791cf71effc1927198ade105e54434d454;hb=61d57ab2718ef04d537b2f4870d7b6a92066d8e0;hp=f62b441f3a5b473942a8f38be61545992ed97267;hpb=9f06a087c58806b5178dabe4b5aa00b5ae504733;p=squirrelmail.git
diff --git a/plugins/spamcop/setup.php b/plugins/spamcop/setup.php
index f62b441f..fbb2d479 100755
--- a/plugins/spamcop/setup.php
+++ b/plugins/spamcop/setup.php
@@ -1,18 +1,15 @@
\n";
-
- /*
- Catch situation when user uses 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';
- }
-
- // Javascript is used only in web based reporting
- // don't insert javascript if javascript is disabled
- if ($spamcop_method == 'web_form' && $javascript_on) {
-?>
-
-");
* @access private
*/
function spamcop_options() {
- global $optpage_blocks;
-
- $optpage_blocks[] = array(
- 'name' => _("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
- );
+ include_once(SM_PATH . 'plugins/spamcop/functions.php');
+ spamcop_options_function();
}
/**
- * When we send the email, we optionally trash it then too
+ * Process messages submitted by email
* @access private
*/
function spamcop_while_sending() {
- global $mailbox, $spamcop_delete, $spamcop_save, $spamcop_is_composing, $auto_expunge,
- $username, $key, $imapServerAddress, $imapPort;
-
- if (sqgetGlobalVar('spamcop_is_composing' , $spamcop_is_composing)) {
- // delete spam message
- if ($spamcop_delete) {
- $imapConnection = sqimap_login($username, $key, $imapServerAddress,
- $imapPort, 0);
- sqimap_mailbox_select($imapConnection, $mailbox);
- sqimap_msgs_list_delete($imapConnection, $mailbox, array($spamcop_is_composing));
- if ($auto_expunge)
- sqimap_mailbox_expunge($imapConnection, $mailbox, true);
- }
- if (! $spamcop_save) {
- // disable use of send folder.
- // Temporally override in order to disable saving of 'reply anyway' messages.
- global $default_move_to_sent;
- $default_move_to_sent=false;
- }
- // change default email composition setting. Plugin always operates in right frame.
- // make sure that compose.php redirects to right page. Temporally override.
- global $compose_new_win;
- $compose_new_win = false;
- }
+ include_once(SM_PATH . 'plugins/spamcop/functions.php');
+ spamcop_while_sending_function();
}
-?>
\ No newline at end of file