summaryrefslogtreecommitdiff
path: root/modules/comment/helpers/comment.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-01-26 16:12:57 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-01-26 16:12:57 +0000
commitbfb5c42124db39605c64f08837eb667be04979cc (patch)
tree99581379399368a1ed7d53176a904fdc12b14c69 /modules/comment/helpers/comment.php
parent57f5cdeb300448e1b5d811d1d319353d61698597 (diff)
Adding Recaptcha to the comment module. Recaptcha integration consists of a Form_Recaptcha class derived from Form_Input that can be added to any class that requires Recaptcha verfication.
Diffstat (limited to 'modules/comment/helpers/comment.php')
-rw-r--r--modules/comment/helpers/comment.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php
index ce9ddcbe..82b4f4b0 100644
--- a/modules/comment/helpers/comment.php
+++ b/modules/comment/helpers/comment.php
@@ -77,6 +77,9 @@ class comment_Core {
$group->input("url") ->label(t("Website (hidden)"))->id("gUrl");
$group->textarea("text")->label(t("Comment")) ->id("gText");
$group->hidden("item_id")->value($item->id);
+ if (module::is_installed("recaptcha")) {
+ $group->recaptcha("recaptcha")->label("")->id("gRecaptcha");
+ }
$group->submit("")->value(t("Add"));
$active = user::active();
@@ -100,6 +103,9 @@ class comment_Core {
$group->input("email") ->label(t("Email (hidden)")) ->id("gEmail");
$group->input("url") ->label(t("Website (hidden)"))->id("gUrl");
$group->textarea("text")->label(t("Comment")) ->id("gText");
+ if (module::is_installed("recaptcha")) {
+ $group->recaptcha("recaptcha")->label("")->id("gRecaptcha");
+ }
$group->submit("")->value(t("Edit"));
$group->text = $comment->text;