From upstream: missing fixes.
* UVrules.pm, usevote.rul: add H, h. * messages.cfg: add COUNT_ERR_GROUPCOUNT. * uvvote.pl: TMP/DIR, $msgid. Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
parent
ef29545875
commit
b00b7d6de5
36
UVrules.pm
36
UVrules.pm
|
@ -149,10 +149,10 @@ sub read_rulefile {
|
||||||
die $errortext . ": $_\n\n" if ($errortext);
|
die $errortext . ": $_\n\n" if ($errortext);
|
||||||
|
|
||||||
# check for correct characters in conditions
|
# check for correct characters in conditions
|
||||||
if ($if !~ /^[JjNnEeSsIi\.]+$/) {
|
if ($if !~ /^[JjNnEeSsHhIi\.]+$/) {
|
||||||
die UVmessage::get ("RULES_INVCHARS", (NUM=>$num+1, TYPE=>"if")) . ": $if\n\n";
|
die UVmessage::get ("RULES_INVCHARS", (NUM=>$num+1, TYPE=>"if")) . ": $if\n\n";
|
||||||
|
|
||||||
} elsif ($then !~ /^[JjNnEeSsIi\.]+$/) {
|
} elsif ($then !~ /^[JjNnEeSsHhIi\.]+$/) {
|
||||||
die UVmessage::get ("RULES_INVCHARS",
|
die UVmessage::get ("RULES_INVCHARS",
|
||||||
(NUM=>$num+1, TYPE=>"if")) . ": $then\n\n";
|
(NUM=>$num+1, TYPE=>"if")) . ": $then\n\n";
|
||||||
}
|
}
|
||||||
|
@ -194,8 +194,9 @@ sub read_rulefile {
|
||||||
sub make_regex_pos {
|
sub make_regex_pos {
|
||||||
my $pat = $_[0];
|
my $pat = $_[0];
|
||||||
|
|
||||||
$pat =~ s/[jens]/./g;
|
$pat =~ s/[hijens]/./g;
|
||||||
$pat =~ s/S/[JN]/g;
|
$pat =~ s/S/[JN]/g;
|
||||||
|
$pat =~ s/H/[EJ]/g;
|
||||||
$pat =~ s/I/[EN]/g;
|
$pat =~ s/I/[EN]/g;
|
||||||
|
|
||||||
return $pat;
|
return $pat;
|
||||||
|
@ -216,22 +217,19 @@ sub make_regex_neg {
|
||||||
|
|
||||||
# upper case characters are replaced with dots
|
# upper case characters are replaced with dots
|
||||||
# (are covered by make_regex_pos)
|
# (are covered by make_regex_pos)
|
||||||
$pat =~ s/[JENS]/./g;
|
$pat =~ s/[HIJENS]/./g;
|
||||||
|
|
||||||
# reverse lower case characters
|
# reverse lower case characters
|
||||||
$pat =~ s/j/[NE]/g;
|
$pat =~ s/j/[NE]/g;
|
||||||
$pat =~ s/n/[JE]/g;
|
$pat =~ s/n/[JE]/g;
|
||||||
$pat =~ s/e/[JN]/g;
|
$pat =~ s/e/[JN]/g;
|
||||||
$pat =~ s/s/E/g;
|
$pat =~ s/s/E/g;
|
||||||
|
$pat =~ s/h/N/g;
|
||||||
$pat =~ s/i/J/g;
|
$pat =~ s/i/J/g;
|
||||||
|
|
||||||
# to be translated:
|
# If the string contained only upper case characters they are now all
|
||||||
# Falls keine Kleinbuchstaben vorkamen (es sind nur Punkte uebrig):
|
# replaced with dots and the RegEx would match everything, i.e. declare
|
||||||
# Wenn keine optionalen Forderungen vorhanden sind, wuerde der Regex
|
# every vote as invalid. In this case an empty pattern is returned.
|
||||||
# immer matchen und somit die Stimme immer als nicht passend erkannt
|
|
||||||
# werden. Deswegen wird versucht auf den leeren String zu ueberpruefen,
|
|
||||||
# was durch die Negation dazu fuehrt, dass die Stimme als passend
|
|
||||||
# gewertet wird.
|
|
||||||
$pat =~ s/^\.+$//;
|
$pat =~ s/^\.+$//;
|
||||||
|
|
||||||
return $pat;
|
return $pat;
|
||||||
|
@ -305,6 +303,10 @@ sub rule_print {
|
||||||
$fill = " $and ";
|
$fill = " $and ";
|
||||||
$text1 = UVmessage::get ("RULES_IFCLAUSE",
|
$text1 = UVmessage::get ("RULES_IFCLAUSE",
|
||||||
(VOTE=>"$yes $or $no", GROUP=>$groups[$i]));
|
(VOTE=>"$yes $or $no", GROUP=>$groups[$i]));
|
||||||
|
} elsif ($rule[$i] eq 'H') {
|
||||||
|
$fill = " $and ";
|
||||||
|
$text1 = UVmessage::get ("RULES_IFCLAUSE",
|
||||||
|
(VOTE=>"$abst $or $yes", GROUP=>$groups[$i]));
|
||||||
} elsif ($rule[$i] eq 'I') {
|
} elsif ($rule[$i] eq 'I') {
|
||||||
$fill = " $and ";
|
$fill = " $and ";
|
||||||
$text1 = UVmessage::get ("RULES_IFCLAUSE",
|
$text1 = UVmessage::get ("RULES_IFCLAUSE",
|
||||||
|
@ -322,6 +324,10 @@ sub rule_print {
|
||||||
$fill = " $or ";
|
$fill = " $or ";
|
||||||
$text1 = UVmessage::get ("RULES_IFCLAUSE",
|
$text1 = UVmessage::get ("RULES_IFCLAUSE",
|
||||||
(VOTE=>"$yes $or $no", GROUP=>$groups[$i]));
|
(VOTE=>"$yes $or $no", GROUP=>$groups[$i]));
|
||||||
|
} elsif ($rule[$i] eq 'h') {
|
||||||
|
$fill = " $or ";
|
||||||
|
$text1 = UVmessage::get ("RULES_IFCLAUSE",
|
||||||
|
(VOTE=>"$abst $or $yes", GROUP=>$groups[$i]));
|
||||||
} elsif ($rule[$i] eq 'i') {
|
} elsif ($rule[$i] eq 'i') {
|
||||||
$fill = " $or ";
|
$fill = " $or ";
|
||||||
$text1 = UVmessage::get ("RULES_IFCLAUSE",
|
$text1 = UVmessage::get ("RULES_IFCLAUSE",
|
||||||
|
@ -357,6 +363,10 @@ sub rule_print {
|
||||||
$fill = " $and ";
|
$fill = " $and ";
|
||||||
$text1 = UVmessage::get ("RULES_THENCLAUSE",
|
$text1 = UVmessage::get ("RULES_THENCLAUSE",
|
||||||
(VOTE=>"$yes $or $no", GROUP=>$groups[$i]));
|
(VOTE=>"$yes $or $no", GROUP=>$groups[$i]));
|
||||||
|
} elsif ($rule[$i] eq 'H') {
|
||||||
|
$fill = " $and ";
|
||||||
|
$text1 = UVmessage::get ("RULES_THENCLAUSE",
|
||||||
|
(VOTE=>"$abst $or $yes", GROUP=>$groups[$i]));
|
||||||
} elsif ($rule[$i] eq 'I') {
|
} elsif ($rule[$i] eq 'I') {
|
||||||
$fill = " $and ";
|
$fill = " $and ";
|
||||||
$text1 = UVmessage::get ("RULES_THENCLAUSE",
|
$text1 = UVmessage::get ("RULES_THENCLAUSE",
|
||||||
|
@ -374,6 +384,10 @@ sub rule_print {
|
||||||
$fill = " $or ";
|
$fill = " $or ";
|
||||||
$text1 = UVmessage::get ("RULES_THENCLAUSE",
|
$text1 = UVmessage::get ("RULES_THENCLAUSE",
|
||||||
(VOTE=>"$yes $or $no", GROUP=>$groups[$i]));
|
(VOTE=>"$yes $or $no", GROUP=>$groups[$i]));
|
||||||
|
} elsif ($rule[$i] eq 'h') {
|
||||||
|
$fill = " $or ";
|
||||||
|
$text1 = UVmessage::get ("RULES_THENCLAUSE",
|
||||||
|
(VOTE=>"$abst $or $yes", GROUP=>$groups[$i]));
|
||||||
} elsif ($rule[$i] eq 'i') {
|
} elsif ($rule[$i] eq 'i') {
|
||||||
$fill = " $or ";
|
$fill = " $or ";
|
||||||
$text1 = UVmessage::get ("RULES_THENCLAUSE",
|
$text1 = UVmessage::get ("RULES_THENCLAUSE",
|
||||||
|
|
|
@ -154,6 +154,7 @@ CFV_SUBJECT = Wahlschein
|
||||||
#
|
#
|
||||||
COUNT_ERR_OPEN = Kann Ergebnisdatei ${FILE} nicht oeffnen!
|
COUNT_ERR_OPEN = Kann Ergebnisdatei ${FILE} nicht oeffnen!
|
||||||
COUNT_ERR_RESULT = Fehler in ${FILE} Zeile ${LINE}
|
COUNT_ERR_RESULT = Fehler in ${FILE} Zeile ${LINE}
|
||||||
|
COUNT_ERR_GROUPCOUNT = Bei Stimme von <${ADDR}>: ${NUM1} statt ${NUM2} Stimmen gefunden (${RESULTFILE} kontrollieren!)
|
||||||
COUNT_DELETED = ${NUM} Stimme(n) geloescht.
|
COUNT_DELETED = ${NUM} Stimme(n) geloescht.
|
||||||
#
|
#
|
||||||
# uvvote.pl
|
# uvvote.pl
|
||||||
|
|
|
@ -30,12 +30,14 @@
|
||||||
# N eine NEIN-Stimme
|
# N eine NEIN-Stimme
|
||||||
# E eine Enthaltung
|
# E eine Enthaltung
|
||||||
# S eine JA- oder NEIN-Stimme
|
# S eine JA- oder NEIN-Stimme
|
||||||
|
# H eine Enthaltung oder JA-Stimme
|
||||||
# I eine Enthaltung oder NEIN-Stimme
|
# I eine Enthaltung oder NEIN-Stimme
|
||||||
# . egal (Ja, nein oder Enthaltung)
|
# . egal (Ja, nein oder Enthaltung)
|
||||||
# j eine oder mehrere der markierten Gruppen hat JA-Stimme
|
# j eine oder mehrere der markierten Gruppen hat JA-Stimme
|
||||||
# n "" "" "" "" "" "" "" NEIN-Stimme
|
# n "" "" "" "" "" "" "" NEIN-Stimme
|
||||||
# e "" "" "" "" "" "" "" Enthaltung
|
# e "" "" "" "" "" "" "" Enthaltung
|
||||||
# s "" "" "" "" "" "" "" Ja- oder Nein-Stimme
|
# s "" "" "" "" "" "" "" Ja- oder Nein-Stimme
|
||||||
|
# h "" "" "" "" "" "" "" Enthaltung oder Ja-Stimme
|
||||||
# i "" "" "" "" "" "" "" Enthaltung oder Nein-Stimme
|
# i "" "" "" "" "" "" "" Enthaltung oder Nein-Stimme
|
||||||
#
|
#
|
||||||
# Alles klar? Jede Stimme wird mit den Symbolen verglichen, und wenn alle
|
# Alles klar? Jede Stimme wird mit den Symbolen verglichen, und wenn alle
|
||||||
|
|
10
uvvote.pl
10
uvvote.pl
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# UseVoteGer 4.07 Wahldurchfuehrung
|
# UseVoteGer 4.09 Wahldurchfuehrung
|
||||||
# (c) 2001-2004 Marc Langer <uv@marclanger.de>
|
# (c) 2001-2005 Marc Langer <uv@marclanger.de>
|
||||||
#
|
#
|
||||||
# This script package is free software; you can redistribute it and/or
|
# This script package is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Public License as published by the
|
# modify it under the terms of the GNU Public License as published by the
|
||||||
|
@ -37,7 +37,7 @@ use UVtemplate;
|
||||||
my $clean = 0;
|
my $clean = 0;
|
||||||
my %opt_ctl = ();
|
my %opt_ctl = ();
|
||||||
|
|
||||||
print "\n$usevote_version Wahldurchfuehrung - (c) 2001-2004 Marc Langer\n\n";
|
print "\n$usevote_version Wahldurchfuehrung - (c) 2001-2005 Marc Langer\n\n";
|
||||||
|
|
||||||
# unknown parameters remain in @ARGV (for "help")
|
# unknown parameters remain in @ARGV (for "help")
|
||||||
Getopt::Long::Configure(qw(pass_through bundling));
|
Getopt::Long::Configure(qw(pass_through bundling));
|
||||||
|
@ -123,7 +123,7 @@ if ($clean) {
|
||||||
my $ext = time;
|
my $ext = time;
|
||||||
|
|
||||||
opendir (TMP, $config{tmpdir});
|
opendir (TMP, $config{tmpdir});
|
||||||
my @tmpfiles = readdir (TMP);
|
my @tmpfiles = readdir (DIR);
|
||||||
closedir (TMP);
|
closedir (TMP);
|
||||||
opendir (FERTIG, $config{archivedir});
|
opendir (FERTIG, $config{archivedir});
|
||||||
my @fertigfiles = readdir (FERTIG);
|
my @fertigfiles = readdir (FERTIG);
|
||||||
|
@ -216,7 +216,7 @@ sub process_vote {
|
||||||
my @header = split(/\n/, $entity->stringify_header);
|
my @header = split(/\n/, $entity->stringify_header);
|
||||||
my $head = $entity->head;
|
my $head = $entity->head;
|
||||||
my $msgid = $head->get('Message-ID');
|
my $msgid = $head->get('Message-ID');
|
||||||
chomp($msgid) if defined($msgid);
|
chomp($msgid) if ($msgid);
|
||||||
|
|
||||||
my @votes = (); # the votes
|
my @votes = (); # the votes
|
||||||
my @set; # interactively changed fields
|
my @set; # interactively changed fields
|
||||||
|
|
Loading…
Reference in a new issue