myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2879] trunk/app: Correctly enable/disable reCAPT


From: noreply
Subject: [myexperiment-hackers] [2879] trunk/app: Correctly enable/disable reCAPTCHA.
Date: Fri, 9 Dec 2011 05:40:18 -0500 (EST)

Revision
2879
Author
dtm
Date
2011-12-09 05:40:08 -0500 (Fri, 09 Dec 2011)

Log Message

Correctly enable/disable reCAPTCHA.

Modified Paths

Diff

Modified: trunk/app/controllers/users_controller.rb (2878 => 2879)


--- trunk/app/controllers/users_controller.rb	2011-12-09 10:20:01 UTC (rev 2878)
+++ trunk/app/controllers/users_controller.rb	2011-12-09 10:40:08 UTC (rev 2879)
@@ -145,13 +145,11 @@
     # check that captcha was entered correctly
 
     unless RAILS_ENV == 'test'
-      if true
-        if Conf.recaptcha_enable
-          if !verify_recaptcha(:private_key => Conf.recaptcha_private)
-            flash.now[:error] = 'Recaptcha text was not entered correctly - please try again.'
-            render :action ="" 'new'
-            return
-          end
+      if Conf.recaptcha_enable
+        if !verify_recaptcha(:private_key => Conf.recaptcha_private)
+          flash.now[:error] = 'Recaptcha text was not entered correctly - please try again.'
+          render :action ="" 'new'
+          return
         end
       else
         if !captcha_valid?(params[:validation][:captcha_id], params[:validation][:captcha_validation])

Modified: trunk/app/views/users/new.rhtml (2878 => 2879)


--- trunk/app/views/users/new.rhtml	2011-12-09 10:20:01 UTC (rev 2878)
+++ trunk/app/views/users/new.rhtml	2011-12-09 10:40:08 UTC (rev 2879)
@@ -28,8 +28,8 @@
 
   <center>
     <h2>Anti-spam verification</h2>
-  <% if true -%>
-    <%= recaptcha_tags(:public_key => Conf.recaptcha_public) if Conf.recaptcha_enable -%> 
+  <% if Conf.recaptcha_enable -%>
+    <%= recaptcha_tags(:public_key => Conf.recaptcha_public) -%> 
   <% else -%>
     <table style="margin-top: 2em;">
       <tr>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]