accept &$links by reference
[squirrelmail.git] / plugins / spamcop / functions.php
index 3d5a03be93599c262e135d583f149ffa106e5311..a36ac3ceed0575143ef9002b5ff704f3184ab440 100644 (file)
@@ -93,7 +93,7 @@ function spamcop_show_link_function() {
     // Javascript is used only in web based reporting
     // don't insert javascript if javascript is disabled
     if ($spamcop_method == 'web_form' && $javascript_on) {
-?><script language="javascript" type="text/javascript">
+?><script type="text/javascript">
 document.write('<a href="../plugins/spamcop/spamcop.php?passed_id=<?php echo urlencode($passed_id); ?>&amp;js_web=1&amp;mailbox=<?php echo urlencode($mailbox); ?>&amp;passed_ent_id=<?php echo urlencode($passed_ent_id); ?>" target="_blank">');
 document.write("<?php echo _("Report as Spam"); ?>");
 document.write("</a>");
@@ -131,13 +131,12 @@ function spamcop_options_function() {
  */
 function spamcop_while_sending_function() {
     global $mailbox, $spamcop_delete, $spamcop_save, $spamcop_is_composing, $auto_expunge,
-           $username, $key, $imapServerAddress, $imapPort;
+           $username, $imapServerAddress, $imapPort;
 
     if (sqgetGlobalVar('spamcop_is_composing' , $spamcop_is_composing)) {
         // delete spam message
         if ($spamcop_delete) {
-            $imapConnection = sqimap_login($username, $key, $imapServerAddress,
-                $imapPort, 0);
+            $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
             sqimap_mailbox_select($imapConnection, $mailbox);
             sqimap_msgs_list_delete($imapConnection, $mailbox, array($spamcop_is_composing));
             if ($auto_expunge)
@@ -214,4 +213,3 @@ function spamcop_getMessage_RFC822_Attachment($message, $composeMessage, $passed
     }
     return $composeMessage;
 }
-?>
\ No newline at end of file