fix for checking notifying type
[squirrelmail.git] / plugins / spamcop / setup.php
index f4d064c65e7fae8a8733108af0b2d016446084bb..835884dd06868e3d80a7faf7f71a01f8c6661b8e 100755 (executable)
@@ -1,4 +1,14 @@
 <?php
+   /** 
+    **  setup.php -- SpamCop plugin           
+    **
+    **  Copyright (c) 1999-2002 The SquirrelMail development team
+    **  Licensed under the GNU GPL. For full terms see the file COPYING.
+    **  
+    **  $Id$                                                         
+    **/
+
+require_once(SM_PATH . 'functions/global.php');
 
 
 /* Initialize the plugin */
@@ -12,6 +22,8 @@ function squirrelmail_plugin_init_spamcop() {
       'spamcop_load';
    $squirrelmail_plugin_hooks['read_body_header_right']['spamcop'] =
       'spamcop_show_link';
+
+   sqextractGlobalVar('spamcop_is_composing');
       
    if (isset($spamcop_is_composing)) {
       $squirrelmail_plugin_hooks['compose_send']['spamcop'] =
@@ -44,17 +56,17 @@ function spamcop_load() {
 
 // Show the link on the read-a-message screen
 function spamcop_show_link() {
-   global $passed_id, $mailbox, $ent_num, $spamcop_enabled, $startMessage,
-      $spamcop_method;
-
-   // This was stolen from printer_friendly
-   // Do I really need/want it?
-   if (!trim($mailbox))
-      $mailbox = 'INBOX';
+   global $spamcop_enabled, $spamcop_method;
 
    if (! $spamcop_enabled)
       return;
 
+   /* GLOBALS */
+   $passed_id = $_GET['passed_id'];
+   $mailbox = $_GET['mailbox'];
+   $startMessage = $_GET['startMessage'];
+   /* END GLOBALS */
+
    echo "<br>\n";
    
    if ($spamcop_method == 'web_form') {