Skip to Content.
Sympa Menu

devel - Re: [sympa-dev] removing include sources

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Olivier Salaun <address@concealed>
  • To: Sergiy Zhuk <address@concealed>
  • Cc: sympa-dev <address@concealed>
  • Subject: Re: [sympa-dev] removing include sources
  • Date: Thu, 24 Jan 2002 13:50:30 +0100

Hi Sergiy,

Sergiy Zhuk wrote:
> > 3.3.1 with that specific patch.
> > I can remove extra owners by making them empty on the html form just fine,
> > but can't remove include_list.
> do_edit_list()
> [...]
> if (! defined($new_p->[$i])) {
> splice @{$new_p}, $i, 1;
> }
> [...]
> If you have an empty value, it will check syntax and that will always fail.
>
> We could do something like this:
> [...]
> if (! $new_p->[$i]) {
> splice @{$new_p}, $i, 1;
> $changed{$pname} = 1;
> next;
> }
> [...]

You're right the config change failed because :
1/ the empty entry's syntax was checked (whereas it should not)
=> you have added a "next"
2/ the empty entries are deleted, thereby shifting following entries
in the array

I also found another bug : the syntax of a new entry (for multivalued
parameters)
was not checked (wrong value of $to_index)

Here is a fix for these problems :
http://listes.cru.fr/cgi-bin/cvsweb.cgi/sympa/wwsympa/wwsympa.fcgi.diff?r1=1.189&r2=1.191&f=c

> But there's another problem.
> You can't remove the only include_list entry even if you've changed
> user_data_source to 'database', because of the earlier checks.
> If it's an empty value, it doesn't go past this line:
> next unless (defined $new_admin->{$pname});

This check is required to skip parameters not available in the current
edit_list form
(edit_list form is now split into sections :
List definition
Sending/reception setup
Privileges
Archives
Bounces management
Data sources setup
Miscelanious
)

Thanks.

--
Olivier Salaün
Comité Réseau des Universités



Archive powered by MHonArc 2.6.19+.

Top of Page