removed service type option - spamcop uses same form for free and paying
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 13 Jul 2006 10:00:35 +0000 (10:00 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 13 Jul 2006 10:00:35 +0000 (10:00 +0000)
reporters. web based reporting form will use members.spamcop.net address
(#1519673). www.spamcop.net form is broken, if user is not logged into
spamcop.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11391 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/spamcop/options.php
plugins/spamcop/spamcop.php

index 2beff6528b2a0f6aa51c635caf1d493e3fe29aee..aba95c89069d144774d16d13ffb86878ca28a98c 100755 (executable)
@@ -26,7 +26,6 @@ displayPageHeader($color, 'None');
 /* globals */
 sqgetGlobalVar('action', $action);
 sqgetGlobalVar('meth', $meth);
-sqgetGlobalVar('type', $type);
 sqgetGlobalVar('ID' , $ID);
 
 sqgetGlobalVar('username', $username, SQ_SESSION);
@@ -58,11 +57,6 @@ switch ($action) {
             setPref($data_dir, $username, 'spamcop_method', $meth);
         }
         break;
-    case 'type':
-        if (isset($type)) {
-            setPref($data_dir, $username, 'spamcop_type', $type);
-        }
-        break;
     case 'save_id':
         if (isset($ID)) {
             $ID = trim($ID);
@@ -143,32 +137,6 @@ spamcop_load_function();
             ?>
           </form></td>
         </tr>
-        <tr>
-            <?php
-              echo html_tag('td',_("Spam Service Type:"),'right');
-            ?>
-          <td>
-          <form method="post" action="options.php">
-            <select name="type">
-              <option value="free"
-                <?php
-                  if ($spamcop_type == 'free') echo ' selected="selected"';
-                  echo ">"._("Free reporting");
-                ?>
-              </option>
-              <option value="member"
-                <?php
-                  if ($spamcop_type == 'member') echo ' selected="selected"';
-                  echo ">"._("Member services");
-                ?>
-              </option>
-            </select>
-            <?php
-              echo '<input type="hidden" name="action" value="type" />' .
-                   '<input type="submit" value="' . _("Save Service Type") . "\" />\n";
-            ?>
-           </form></td>
-        </tr>
         <tr>
           <?php
             echo html_tag('td',_("Your SpamCop authorization code:") . "<br />" .
index 96ede3aae4ce4b402e0c8659bb35b1db264f8b67..f27e8b6e29172ea3cae2e1cc7f54946804ee58a4 100644 (file)
  * Include the SquirrelMail initialization file.
  */
 require('../../include/init.php');
-
+/* IMAP functions depend on date and mime */
+include_once(SM_PATH . 'functions/date.php');
+include_once(SM_PATH . 'functions/mime.php');
+/* IMAP functions */
 include_once(SM_PATH . 'functions/imap_general.php');
 include_once(SM_PATH . 'functions/imap_messages.php');
 /* plugin functions */
@@ -148,11 +151,8 @@ echo "</p>";
       $Warning = "\n[truncated by SpamCop]\n";
       $spam_message = substr($spam_message, 0, 50000 - strlen($Warning)) . $Warning;
    }
-   if ($spamcop_type=='member') {
-     $action_url="http://members.spamcop.net/sc";
-   } else {
-     $action_url="http://www.spamcop.net/sc";
-   }
+   $action_url="http://members.spamcop.net/sc";
+
    if (isset($js_web) && $js_web) {
      echo "<form method=\"post\" action=\"$action_url\" name=\"submitspam\"".
        " enctype=\"multipart/form-data\">\n";
@@ -162,7 +162,6 @@ echo "</p>";
    } ?>
   <input type="hidden" name="action" value="submit" />
   <input type="hidden" name="oldverbose" value="1" />
-  <input type="hidden" name="code" value="<?php echo htmlspecialchars($spamcop_id) ?>" />
   <input type="hidden" name="spam" value="<?php echo htmlspecialchars($spam_message); ?>" />
     <?php
         echo '<input type="submit" name="x1" value="' . _("Send Spam Report") . "\" />\n";