Skip to Content.
Sympa Menu

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

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Sergiy Zhuk <address@concealed>
  • To: Olivier Salaun <address@concealed>
  • Cc: sympa-dev <address@concealed>
  • Subject: Re: [sympa-dev] removing include sources
  • Date: Wed, 23 Jan 2002 17:54:45 -0800 (PST)

hi

follow-up

> > We recently corrected problems with empty values in edit_list form. I had
> > a try on our dev. server and it allows include_list entries deletion.
> > What version are you running ?
>
> 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.

I read the latest code, it still has the same problem in wwsympa.pl

do_edit_list()

[..]

include_list is a Scalar, so we end up here:

## Scalar
## Ex: 'max_size'
}else {
if (! defined($new_p->[$i])) {
splice @{$new_p}, $i, 1;
}

if ($p->[$i] ne $new_p->[$i]) {
unless ($new_p->[$i] =~ /^$pinfo->{$pname}{'file_format'}$/
push @syntax_error, $pname;
}
$changed{$pname} = 1; next;
}
}

If you have an empty value, it will check syntax and that will always fail.

We could do something like this:

## Scalar
## Ex: 'max_size'
}else {
if (! $new_p->[$i]) {
splice @{$new_p}, $i, 1;
$changed{$pname} = 1;
next;
}
if ($p->[$i] ne $new_p->[$i]) {

unless ($new_p->[$i] =~ /^$pinfo->{$pname}{'file_format'}$/
push @syntax_error, $pname;
}
$changed{$pname} = 1; next;
}
}

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});

I don't really have a fix for this since I'm not sure I completely understand
why it was written this way, i.e. I maybe missing something.

thanks

--
rgds,
serge




Archive powered by MHonArc 2.6.19+.

Top of Page