consider ezmlm-idx5

This commit is contained in:
lars 2005-12-26 15:30:20 +00:00
parent bf6c5d0c1f
commit 255cbdb494
2 changed files with 28 additions and 19 deletions

View file

@ -30,4 +30,6 @@ Revision history for Perl extension Mail::Ezmlm.
- fixed some tainting problems (Scott Beck <sbeck@gossamer-threads.com> and Matt Simerson <matt@tnpi.biz>)
- fixed order of control/defaulthost and control/me (bug 1515)
- fixed a bug in Makefile.PL (bug 11771). does not affect most users, so released as 0.05.1
0.06 Mon Dec 26 18:55:12 CET 2005
- support for ezmlm-idx-5.0.0 added

View file

@ -51,7 +51,7 @@ require Exporter;
@EXPORT = qw(
);
$VERSION = '0.05';
$VERSION = '0.06';
require 5.005;
@ -175,27 +175,34 @@ sub update {
# == Get a list of options for the current list ==
sub getconfig {
my($self) = @_;
my($options, $i);
my($self) = @_;
my($options, $i);
# Read the config file
if(open(CONFIG, "<$self->{'LIST_NAME'}/config")) {
while(<CONFIG>) {
if (/^F:-(\w+)/) {
$options = $1;
} elsif (/^(\d):(.+)$/) {
$options .= " -$1 '$2'";
}
}
close CONFIG;
} else {
# Try manually
$options = $self->_getconfigmanual();
}
# Read the config file
if(open(CONFIG, "<$self->{'LIST_NAME'}/dot")) {
# this file exists since ezmlm-idx-5.0.0
# 'config' is not authorative anymore since this version
$option = $self->_getconfigmanual_idx5();
} elsif(open(CONFIG, "<$self->{'LIST_NAME'}/config")) {
# 'config' contains the authorative information
while(<CONFIG>) {
if (/^F:-(\w+)/) {
$options = $1;
} elsif (/^(\d):(.+)$/) {
$options .= " -$1 '$2'";
}
}
close CONFIG;
} else {
# Try manually
$options = $self->_getconfigmanual_idx4();
}
($self->_seterror(-1, 'unable to read configuration in getconfig()') && return undef) unless (defined($options));
# Add the unselected options too
# TODO: this is not especially great, as some options are undefined and cause an
# error, if you use it for update
foreach $i ('a' .. 'z') {
$options .= uc($i) unless ($options =~ /$i/i)
}
@ -508,7 +515,7 @@ sub _checkaddress {
}
# == Internal function to work out a list configuration ==
sub _getconfigmanual {
sub _getconfigmanual_idx4 {
my($self) = @_;
my ($savedollarslash, $options, $manager, $editor);