X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fspamcop%2Foptions.php;h=f30987ad46b9a27141c63410a89ddeeb65a203dd;hp=bc5e76ff5da1f9129ef7fab3224bb426e944a3b3;hb=cdb3b004685f28cd34a38cec8d446aba1f0f72ff;hpb=91e0dccca7b2452d8b450791cae3aa4125e8889e
diff --git a/plugins/spamcop/options.php b/plugins/spamcop/options.php
index bc5e76ff..f30987ad 100755
--- a/plugins/spamcop/options.php
+++ b/plugins/spamcop/options.php
@@ -1,40 +1,31 @@
" . _("Disable it") . ")\n";
- } else {
- $ret = _("Disabled") . "(" . _("Enable it") . ")\n";
- }
- return $ret;
-}
+require('../../include/init.php');
+/* plugin functions */
+include_once(SM_PATH . 'plugins/spamcop/functions.php');
displayPageHeader($color, 'None');
+/** is spamcop plugin disabled */
+// option changes do nothing, if read_body_header_right hook is not active.
+
/* globals */
sqgetGlobalVar('action', $action);
sqgetGlobalVar('meth', $meth);
-sqgetGlobalVar('type', $type);
sqgetGlobalVar('ID' , $ID);
sqgetGlobalVar('username', $username, SQ_SESSION);
@@ -55,16 +46,17 @@ switch ($action) {
case 'delete':
setPref($data_dir, $username, 'spamcop_delete', 1);
break;
+ case 'keep':
+ setPref($data_dir, $username, 'spamcop_save', 0);
+ break;
+ case 'dontkeep':
+ setPref($data_dir, $username, 'spamcop_save', 1);
+ break;
case 'meth':
if (isset($meth)) {
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);
@@ -75,16 +67,16 @@ switch ($action) {
break;
}
-global $spamcop_enabled, $spamcop_delete, $spamcop_quick_report;
-spamcop_load();
+global $spamcop_enabled, $spamcop_delete, $spamcop_save, $spamcop_quick_report;
+spamcop_load_function();
?>
-
-
+
|