Correctly find $votename.
Picked from upstream. Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
parent
f5828d9fad
commit
3ab56bde53
2
CHANGES
2
CHANGES
|
@ -26,6 +26,8 @@ Version 4.12 (19.01.2014):
|
|||
- BDSG-Klausel muss nun standardmaessig zwingend mit JA beantwortet
|
||||
werden, DAFUER wird nicht mehr akzeptiert. Dies kann in usevote.cfg
|
||||
konfiguriert werden
|
||||
- Regular Expression fuer Pruefung des Abstimmungsnamens weiter
|
||||
verbessert
|
||||
|
||||
Version 4.11 (25.09.2012):
|
||||
- Regular Expression fuer Pruefung des Abstimmungsnamens verbessert.
|
||||
|
|
|
@ -121,6 +121,7 @@ sub read_config {
|
|||
tpl_rule_violated => 'rule-violated',
|
||||
begin_divider => 'Alles vor dieser Zeile bitte loeschen',
|
||||
end_divider => 'Alles nach dieser Zeile bitte loeschen',
|
||||
ballotintro => 'WAHLSCHEIN fuer',
|
||||
nametext => 'Dein Realname, falls nicht im FROM-Header:',
|
||||
nametext2 => 'Waehlername:',
|
||||
addresstext => 'Waehleradresse:',
|
||||
|
|
|
@ -231,9 +231,9 @@ sub process_vote {
|
|||
}
|
||||
|
||||
# correct voting?
|
||||
if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)[^\S\n]*\n([>:|]*?[\t ]+(\S+.+)\s*$)?/m) {
|
||||
if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)\s*\n([>:|]*?[\t ]+(\S+.+)\s*$)?/m) {
|
||||
$voting = $1;
|
||||
$voting .= " $3" if defined($3);
|
||||
$voting .= " $3" if (defined($3) and $3 !~ /\Q$config{nametext}\E/);
|
||||
push (@errors, 'WrongVoting') if ($config{votename} !~ /^\s*\Q$voting\E\s*$/);
|
||||
} else {
|
||||
push (@errors, 'NoVoting');
|
||||
|
|
Loading…
Reference in a new issue