Move captcha template parameters into plugin (#1652)

This commit is contained in:
Xavier Guimard 2019-03-27 12:30:11 +01:00
parent 8c562c7817
commit 857ee8b0a0
2 changed files with 2 additions and 10 deletions

View File

@ -101,7 +101,8 @@ sub setCaptcha {
my ( $token, $image ) = $self->getCaptcha;
$self->logger->debug('Prepare captcha');
$req->token($token);
$req->captcha($image);
$req->tplParams->{CAPTCHA_SRC} = $req->captcha($image);
$req->tplParams->{CAPTCHA_SIZE} = $self->rndmax;
}
1;

View File

@ -313,15 +313,6 @@ sub display {
: ()
),
( $req->token ? ( TOKEN => $req->token ) : () ),
(
$req->captcha
? (
CAPTCHA_SRC => $req->captcha,
CAPTCHA_SIZE => $self->{conf}->{captcha_size}
|| 6
)
: ()
),
( $req->data->{waitingMessage} ? ( WAITING_MESSAGE => 1 ) : () ),
);