Commit 3a43cd5ef1e61df885bc59e267d2d9374d200293
1 parent
88227abb
Exists in
master
Rails 4 changes
Showing
3 changed files
with
2 additions
and
7 deletions
Show diff stats
lib/ext/environment.rb
@@ -3,7 +3,7 @@ require_dependency 'environment' | @@ -3,7 +3,7 @@ require_dependency 'environment' | ||
3 | class Environment | 3 | class Environment |
4 | 4 | ||
5 | #reCAPTCHA settings | 5 | #reCAPTCHA settings |
6 | - settings_items :recaptcha_plugin, :type => ActiveSupport::HashWithIndifferentAccess, :default => {} | 6 | + settings_items :recaptcha_plugin, :type => Hash, :default => {} |
7 | attr_accessible :recaptcha_plugin_attributes, :recaptcha_version, :recaptcha_private_key, :recaptcha_site_key, :recaptcha_verify_uri | 7 | attr_accessible :recaptcha_plugin_attributes, :recaptcha_version, :recaptcha_private_key, :recaptcha_site_key, :recaptcha_verify_uri |
8 | 8 | ||
9 | def recaptcha_plugin_attributes | 9 | def recaptcha_plugin_attributes |
lib/recaptcha_plugin.rb
@@ -8,10 +8,6 @@ class RecaptchaPlugin < Noosfero::Plugin | @@ -8,10 +8,6 @@ class RecaptchaPlugin < Noosfero::Plugin | ||
8 | _("Provides a plugin to Google reCAPTCHA.") | 8 | _("Provides a plugin to Google reCAPTCHA.") |
9 | end | 9 | end |
10 | 10 | ||
11 | - def self.api_mount_points | ||
12 | - [RecaptchaPlugin::API ] | ||
13 | - end | ||
14 | - | ||
15 | def test_captcha(*args) | 11 | def test_captcha(*args) |
16 | remote_ip = args[0] | 12 | remote_ip = args[0] |
17 | params = args[1] | 13 | params = args[1] |
@@ -26,7 +22,6 @@ class RecaptchaPlugin < Noosfero::Plugin | @@ -26,7 +22,6 @@ class RecaptchaPlugin < Noosfero::Plugin | ||
26 | 22 | ||
27 | return RecaptchaVerification.hash_error(msg_icve, status, nil, "#{msg_erpa} private_key not defined") if private_key.nil? | 23 | return RecaptchaVerification.hash_error(msg_icve, status, nil, "#{msg_erpa} private_key not defined") if private_key.nil? |
28 | return RecaptchaVerification.hash_error(msg_icve, status, nil, "#{msg_erpa} version not defined") unless version == 1 || version == 2 | 24 | return RecaptchaVerification.hash_error(msg_icve, status, nil, "#{msg_erpa} version not defined") unless version == 1 || version == 2 |
29 | - | ||
30 | rv = RecaptchaVerification.new | 25 | rv = RecaptchaVerification.new |
31 | if version == 1 | 26 | if version == 1 |
32 | verify_uri = 'https://www.google.com/recaptcha/api/verify' | 27 | verify_uri = 'https://www.google.com/recaptcha/api/verify' |
views/recaptcha_plugin_admin/index.html.erb
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | <th><%= _('Value') %></th> | 8 | <th><%= _('Value') %></th> |
9 | </tr> | 9 | </tr> |
10 | <tr> | 10 | <tr> |
11 | - <td><%= _('Version (1 or 2)') %></td> | 11 | + <td><%= _('Version number (1 or 2)') %></td> |
12 | <td><%= text_field :environment, :recaptcha_version %></td> | 12 | <td><%= text_field :environment, :recaptcha_version %></td> |
13 | </tr> | 13 | </tr> |
14 | <tr> | 14 | <tr> |