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

Marc G. Fournier scrappy@hub.org
Tue, 8 Oct 2002 16:17:36 -0300 (ADT)



Somehow or another, if one is going to do this kind of change, it should
be deriving its values from the system default settings, and not some
arbitrary ones ... for instance, by default, I have stuff like
rewrite_subject disabled, as well as defang_mime ...

As provided here, this patch should not be applied ... if nothing else can
be done, the default values should be part of conf.xml itself ...


On Mon, 7 Oct 2002 bugs@bugs.horde.org wrote:

> 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';
> +
>
>
> --
> To unsubscribe, mail: bugs-unsubscribe@lists.horde.org
>