summaryrefslogtreecommitdiff
path: root/modules/recaptcha
diff options
context:
space:
mode:
authorroot <root@sleepydogs.net>2009-09-13 09:01:55 -0700
committerroot <root@sleepydogs.net>2009-09-13 09:01:55 -0700
commitc62d1f440f077ba806b7ff0c6b90ef89c79b2fd3 (patch)
treeb64f05e2a7bd8db7200e3c407904e255826b4cf2 /modules/recaptcha
parentb96ac1eb81b7ccd5bd050ffab0ca9ce1feec8f4f (diff)
parentcaa2002d7777e0ceb884d4c628650804620ca2b6 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/recaptcha')
-rw-r--r--modules/recaptcha/helpers/recaptcha.php2
-rw-r--r--modules/recaptcha/helpers/recaptcha_event.php8
-rw-r--r--modules/recaptcha/helpers/recaptcha_installer.php4
-rw-r--r--modules/recaptcha/helpers/recaptcha_menu.php28
-rw-r--r--modules/recaptcha/views/admin_recaptcha.html.php4
-rw-r--r--modules/recaptcha/views/form_recaptcha.html.php2
6 files changed, 12 insertions, 36 deletions
diff --git a/modules/recaptcha/helpers/recaptcha.php b/modules/recaptcha/helpers/recaptcha.php
index 501dd972..bead6156 100644
--- a/modules/recaptcha/helpers/recaptcha.php
+++ b/modules/recaptcha/helpers/recaptcha.php
@@ -43,7 +43,7 @@ class recaptcha_Core {
if (empty($public_key) || empty($private_key)) {
site_status::warning(
t("reCAPTCHA is not quite ready! Please configure the <a href=\"%url\">reCAPTCHA Keys</a>",
- array("url" => url::site("admin/recaptcha"))),
+ array("url" => html::mark_clean(url::site("admin/recaptcha")))),
"recaptcha_config");
} else {
site_status::clear("recaptcha_config");
diff --git a/modules/recaptcha/helpers/recaptcha_event.php b/modules/recaptcha/helpers/recaptcha_event.php
index 932ddee6..d23a0c74 100644
--- a/modules/recaptcha/helpers/recaptcha_event.php
+++ b/modules/recaptcha/helpers/recaptcha_event.php
@@ -23,4 +23,12 @@ class recaptcha_event_Core {
$form->add_comment->recaptcha("recaptcha")->label("")->id("gRecaptcha");
}
}
+
+ static function admin_menu($menu, $theme) {
+ $menu->get("settings_menu")
+ ->append(Menu::factory("link")
+ ->id("recaptcha")
+ ->label(t("reCAPTCHA"))
+ ->url(url::site("admin/recaptcha")));
+ }
}
diff --git a/modules/recaptcha/helpers/recaptcha_installer.php b/modules/recaptcha/helpers/recaptcha_installer.php
index 12044a1b..e04822ea 100644
--- a/modules/recaptcha/helpers/recaptcha_installer.php
+++ b/modules/recaptcha/helpers/recaptcha_installer.php
@@ -18,10 +18,6 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class recaptcha_installer {
- static function install() {
- module::set_version("recaptcha", 1);
- }
-
static function activate() {
recaptcha::check_config();
}
diff --git a/modules/recaptcha/helpers/recaptcha_menu.php b/modules/recaptcha/helpers/recaptcha_menu.php
deleted file mode 100644
index 047abf8f..00000000
--- a/modules/recaptcha/helpers/recaptcha_menu.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php defined("SYSPATH") or die("No direct script access.");
-/**
- * Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2009 Bharat Mediratta
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
- */
-class recaptcha_menu_Core {
- static function admin($menu, $theme) {
- $menu->get("settings_menu")
- ->append(Menu::factory("link")
- ->id("recaptcha")
- ->label(t("reCAPTCHA"))
- ->url(url::site("admin/recaptcha")));
- }
-}
diff --git a/modules/recaptcha/views/admin_recaptcha.html.php b/modules/recaptcha/views/admin_recaptcha.html.php
index 43b4da8a..0a4b1f8f 100644
--- a/modules/recaptcha/views/admin_recaptcha.html.php
+++ b/modules/recaptcha/views/admin_recaptcha.html.php
@@ -4,7 +4,7 @@
<p>
<?= t("reCAPTCHA is a free CAPTCHA service that helps to digitize books, newspapers and old time radio shows. In order to use it, you need to sign up for a <a href=\"%domain_url\">reCAPTCHA Public/Private Key pair</a>, which is also free. Once registered, the challenge and response strings are evaluated at <a href=\"%recaptcha_url\">recaptcha.net</a> to determine if the form content has been entered by a bot.",
array("domain_url" => $form->get_key_url,
- "recaptcha_url" => "http://recaptcha.net")) ?>
+ "recaptcha_url" => html::mark_clean("http://recaptcha.net"))) ?>
</p>
<?= $form ?>
@@ -23,7 +23,7 @@
Recaptcha.create("<?= $public_key ?>", "gRecaptcha", {
callback: Recaptcha.focus_response_field,
lang: "en",
- custom_translations : { instructions_visual : "<?= t("Type words to check:") ?>"},
+ custom_translations : { instructions_visual : <?= t("Type words to check:")->for_js() ?>},
theme: "white"
});
</script>
diff --git a/modules/recaptcha/views/form_recaptcha.html.php b/modules/recaptcha/views/form_recaptcha.html.php
index d4031586..4ec04c49 100644
--- a/modules/recaptcha/views/form_recaptcha.html.php
+++ b/modules/recaptcha/views/form_recaptcha.html.php
@@ -8,7 +8,7 @@
"gRecaptcha",
{
theme: "white",
- custom_translations : { instructions_visual : "<?= t("Type words to check:") ?>"},
+ custom_translations : { instructions_visual : <?= t("Type words to check:")->for_js() ?>},
callback: Recaptcha.focus_response_field
}
);