From 74e3f42fe490ddf1c373a201ea02c5d53aed8bea Mon Sep 17 00:00:00 2001 From: Martin Kamerbeek Date: Thu, 23 Oct 2008 12:20:22 +0000 Subject: [PATCH] Made it possible to actually save Treads again.... --- lib/WebGUI/Asset/Post/Thread.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/WebGUI/Asset/Post/Thread.pm b/lib/WebGUI/Asset/Post/Thread.pm index b26d57b23..27d5a3a6d 100644 --- a/lib/WebGUI/Asset/Post/Thread.pm +++ b/lib/WebGUI/Asset/Post/Thread.pm @@ -582,14 +582,18 @@ sub postProcess { $self->SUPER::postProcess; } +#------------------------------------------------------------------- sub processPropertiesFromFormPost { my $self = shift; - if ($self->isNew && $self->getParent->getValue('useCaptcha')) { - my $captcha = $self->session->form->process("captcha","Captcha"); - return [ 'invalid captcha' ]; - } -} + if ($self->isNew && $self->getParent->getValue('useCaptcha')) { + my $captchaOk = $self->session->form->process("captcha","Captcha"); + + return [ 'invalid captcha' ] unless $captchaOk; + } + + return $self->SUPER::processPropertiesFromFormPost; +} #------------------------------------------------------------------- sub purge {