summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Discussions.pm
diff options
context:
space:
mode:
author3dB <3db@3decibels.net>2009-08-04 01:03:29 -0400
committer3dB <3db@3decibels.net>2009-08-04 01:03:29 -0400
commit8bfbcc91073690d4847ea6ca783c9d839c3ffcb6 (patch)
tree587e9595e0676f587acbd233948796bef6a37914 /lib/VNDB/Handler/Discussions.pm
parenta130a4f79e04f8a6ccd4514b9a1d0285c63edfea (diff)
Implemented double-post prevention
-- Created a subroutine to check for any recent posts made by a user -- Added double-post checking and error messages to the form handler & html generator
Diffstat (limited to 'lib/VNDB/Handler/Discussions.pm')
-rw-r--r--lib/VNDB/Handler/Discussions.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/VNDB/Handler/Discussions.pm b/lib/VNDB/Handler/Discussions.pm
index eff8212e..dce8dcde 100644
--- a/lib/VNDB/Handler/Discussions.pm
+++ b/lib/VNDB/Handler/Discussions.pm
@@ -166,6 +166,9 @@ sub edit {
{ name => 'msg', maxlenght => 5000 },
);
+ # check for double-posting
+ push @{$frm->{_err}}, 'doublepost' if $self->dbPostCheckDouble($self->{_auth}{id}, $tid);
+
# parse and validate the boards
my @boards;
if(!$frm->{_err} && $frm->{boards}) {