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', {