From bfafef95e8090b66f3322f73e532056b10ca116a Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 29 Oct 2009 09:21:07 -0700 Subject: Generalize the adding of the recaptcha form by changing the name of the event to recaptch_add. This prevents us from having to keep modifying the recaptch module anytime we add a form that requires recaptcha. --- modules/comment/helpers/comment.php | 2 +- modules/recaptcha/helpers/recaptcha_event.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php index 35685d8c..37b11206 100644 --- a/modules/comment/helpers/comment.php +++ b/modules/comment/helpers/comment.php @@ -72,7 +72,7 @@ class comment_Core { $group->input("url") ->label(t("Website (hidden)"))->id("g-url"); $group->textarea("text")->label(t("Comment")) ->id("g-text"); $group->hidden("item_id")->value($item->id); - module::event("comment_add_form", $form); + module::event("recaptcha_add", $form); $group->submit("")->value(t("Add"))->class("ui-state-default ui-corner-all"); $active = identity::active_user(); diff --git a/modules/recaptcha/helpers/recaptcha_event.php b/modules/recaptcha/helpers/recaptcha_event.php index feedced4..6e885656 100644 --- a/modules/recaptcha/helpers/recaptcha_event.php +++ b/modules/recaptcha/helpers/recaptcha_event.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class recaptcha_event_Core { - static function comment_add_form($form) { + static function recaptcha_add($form) { if (module::get_var("recaptcha", "public_key")) { $form->add_comment->recaptcha("recaptcha")->label("")->id("g-recaptcha"); } -- cgit v1.2.3