From 8ddc4111412e862064e7940036f276ea87b496d6 Mon Sep 17 00:00:00 2001 From: kink Date: Tue, 11 Mar 2003 16:30:54 +0000 Subject: [PATCH] Clean up spamcop plugin wrt globals. Fix a bug in saving the spamcop ID. Eliminate evil "extract($_SESSION);" statement. And make the produced html more valid. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4643 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/spamcop/options.php | 66 +++++++++++++------------ plugins/spamcop/setup.php | 8 +-- plugins/spamcop/spamcop.php | 98 +++++++++++++++++-------------------- 3 files changed, 84 insertions(+), 88 deletions(-) diff --git a/plugins/spamcop/options.php b/plugins/spamcop/options.php index c4298c83..d9ec771c 100755 --- a/plugins/spamcop/options.php +++ b/plugins/spamcop/options.php @@ -17,8 +17,9 @@ displayPageHeader($color, 'None'); /* globals */ sqgetGlobalVar('action', $action); sqgetGlobalVar('meth', $meth); -sqgetGlobalVar('ID' , $meth); -extract($_SESSION); +sqgetGlobalVar('ID' , $ID); + +sqgetGlobalVar('username', $username, SQ_SESSION); /* end of globals */ $action = (!isset($action) ? '' : $action); @@ -55,16 +56,17 @@ global $spamcop_enabled, $spamcop_delete; spamcop_load(); ?> -
-
-
- Message Filtering
+
+ +
+
- Message Filtering
-
+
- +
- - + - - - - + - -
SpamCop link is:SpamCop link is:Enabled (Disable it) Disabled (Enable it) @@ -72,43 +74,43 @@ spamcop_load(); ?>
Delete spam when reported:
+
Delete spam when reported:
(Only works with email-based reporting)
Enabled (Disable it) - Disabled (Enable it) -
Spam Reporting Method:
- + - - + +
Your SpamCop authorization code:
+
Your SpamCop authorization code:
(see below)
- - - + + + +
@@ -140,7 +142,7 @@ this message as spam. Clicking on it brings you to a confirmation page. Confirming that you want the spam report sent will do different things with different reporting methods.

-

Email-based Reporting
+

Email-based Reporting
Pressing the button forwards the message to the SpamCop service and will optionally delete the message. From there, you just need to go to your INBOX and quite soon a message should appear from SpamCop. (It gets sent to @@ -152,7 +154,7 @@ window will open.

reporting. Also, it appears that this is for members (non-free) only. Hopefully this will change soon.

-

Web-based Reporting
+

Web-based Reporting
When you press the button on the confirmation page, this will pop open a new browser window and the SpamCop service should appear inside. The message will not be deleted (working on that part), but you won't need to wait for a diff --git a/plugins/spamcop/setup.php b/plugins/spamcop/setup.php index 21d472f5..8c7d5e4d 100755 --- a/plugins/spamcop/setup.php +++ b/plugins/spamcop/setup.php @@ -62,15 +62,15 @@ function spamcop_show_link() { return; /* GLOBALS */ - $passed_id = $_GET['passed_id']; - $mailbox = $_GET['mailbox']; - $startMessage = $_GET['startMessage']; + sqgetGlobalVar('passed_id', $passed_id, SQ_GET); + sqgetGlobalVar('mailbox', $mailbox, SQ_GET); + sqgetGlobalVar('startMessage', $startMessage, SQ_GET); /* END GLOBALS */ echo "
\n"; if ($spamcop_method == 'web_form') { -?>