From bf0867573c7f9616ae544ed12ca079dbffc5bf76 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Wed, 23 Aug 2017 11:09:49 +1000 Subject: [PATCH] + CMTD::Helpers->captcha_by_id --- lib/CMTD/Helpers.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/CMTD/Helpers.pm b/lib/CMTD/Helpers.pm index 064123a..abbcd14 100644 --- a/lib/CMTD/Helpers.pm +++ b/lib/CMTD/Helpers.pm @@ -72,6 +72,10 @@ sub register { my ($c, $pid) = @_; return $self->app->db->select('comments', '*', {pid => $pid}, 'seq')->hashes; }); + $app->helper(captcha_by_id => sub { + my ($c, $cid) = @_; + return $self->app->db->select('captcha', '*', {cid => $cid})->hash; + }); $app->helper(add_page => sub { my ($c, $sid, $page) = @_; $self->app->db->insert('pages', {