[bugs] [Bug 1067] New - [sam] Spam Rules not initialized to defaults for new users

bugs@bugs.horde.org bugs@bugs.horde.org
Mon, 7 Oct 2002 15:44:38 -0300


http://bugs.horde.org/show_bug.cgi?id=1067

*** shadow/1067	Mon Oct  7 15:44:38 2002
--- shadow/1067.tmp.28029	Mon Oct  7 15:44:38 2002
***************
*** 0 ****
--- 1,51 ----
+ Bug#: 1067
+ Product: Horde
+ Version: 2.3 Unstable
+ Platform: PHP Code
+ OS/Version: All
+ Status: NEW   
+ Resolution: 
+ Severity: minor
+ Priority: P3
+ Component: Core
+ Area: BUILD
+ AssignedTo: chuck@horde.org                            
+ ReportedBy: horde@jonuschat.de               
+ URL: 
+ Summary: [sam] Spam Rules not initialized to defaults for new users
+ 
+ When a new user enters sam, all option in "Spam Rules" are empty. The 
+ following patch offers some defaults in that case. 
+ 
+ --- spamassassin.php.orig       Mon Oct  7 20:21:16 2002
+ +++ spamassassin.php    Mon Oct  7 20:31:21 2002
+ @@ -52,13 +52,13 @@
+      $notification->push(_("Updated Spam Rules"), 'horde.success');
+  }
+ 
+ -$required_hits = $sam->getOption('required_hits');
+ -$rewrite_subject = $sam->getOption('rewrite_subject');
+ -$subject_tag = $sam->getOption('subject_tag');
+ -$spam_level_stars = $sam->getOption('spam_level_stars');
+ -$report_header = $sam->getOption('report_header');
+ -$use_terse_report = $sam->getOption('use_terse_report');
+ -$defang_mime = $sam->getOption('defang_mime');
+ +$required_hits = $sam->getOption('required_hits') ? $sam->getOption
+ ('required_hits') : "5.0" ;
+ +$rewrite_subject = $sam->getOption('rewrite_subject') ? $sam->getOption
+ ('rewrite_subject') : 0;
+ +$subject_tag = $sam->getOption('subject_tag') ? $sam->getOption
+ ('subject_tag') : "****SPAM****";
+ +$spam_level_stars = $sam->getOption('spam_level_stars') ? $sam->getOption
+ ('spam_level_stars') : 0;
+ +$report_header = $sam->getOption('report_header') ? $sam->getOption
+ ('report_header') : 1;
+ +$use_terse_report = $sam->getOption('use_terse_report') ? $sam->getOption
+ ('use_terse_report') : 0;
+ +$defang_mime = $sam->getOption('defang_mime') ? $sam->getOption
+ ('defang_mime') : 1;
+ 
+  $help = (boolean)$conf['user']['online_help'] && $browser->hasFeature
+ ('javascript');
+  require SAM_TEMPLATES . '/common-header.inc';
+