summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Producers.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-12-17 15:14:56 +0100
committerYorhel <git@yorhel.nl>2010-12-17 15:14:56 +0100
commit7849c8aeb4f6e6c829a128d7303f63df999a337f (patch)
tree073ec5a6c751759a57f808d60c31de76621514e8 /lib/VNDB/Handler/Producers.pm
parent50cfb305796d1d115c408feefbe39fddf7615166 (diff)
Check for editsum = description and give an easier to understand error
The check is quite basic and you can easily get around it. It's just intended to warn about common mistakes.
Diffstat (limited to 'lib/VNDB/Handler/Producers.pm')
-rw-r--r--lib/VNDB/Handler/Producers.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VNDB/Handler/Producers.pm b/lib/VNDB/Handler/Producers.pm
index d6308593..f7a46c2d 100644
--- a/lib/VNDB/Handler/Producers.pm
+++ b/lib/VNDB/Handler/Producers.pm
@@ -225,10 +225,11 @@ sub edit {
{ name => 'l_wp', required => 0, maxlength => 150, default => '' },
{ name => 'desc', required => 0, maxlength => 5000, default => '' },
{ name => 'prodrelations', required => 0, maxlength => 5000, default => '' },
- { name => 'editsum', maxlength => 5000 },
+ { name => 'editsum', required => 0, maxlength => 5000 },
{ name => 'ihid', required => 0 },
{ name => 'ilock', required => 0 },
);
+ push @{$frm->{_err}}, 'badeditsum' if !$frm->{editsum} || lc($frm->{editsum}) eq lc($frm->{desc});
if(!$frm->{_err}) {
# parse
my $relations = [ map { /^([a-z]+),([0-9]+),(.+)$/ && (!$pid || $2 != $pid) ? [ $1, $2, $3 ] : () } split /\|\|\|/, $frm->{prodrelations} ];