myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [2019] branches/invitation_throttling/app/control


From: noreply
Subject: [myexperiment-hackers] [2019] branches/invitation_throttling/app/controllers: Throttling.
Date: Sun, 30 Nov 2008 08:40:18 -0500 (EST)

Revision
2019
Author
alekses6
Date
2008-11-30 08:40:17 -0500 (Sun, 30 Nov 2008)

Log Message

Throttling. Bug-fix. When sending invitations to correct email address(es) when the quota is depleted, the error message was indicating that "email addresses couldn't be validated". Now fixed to display the correct error message.

Modified Paths

Diff

Modified: branches/invitation_throttling/app/controllers/networks_controller.rb (2018 => 2019)


--- branches/invitation_throttling/app/controllers/networks_controller.rb	2008-11-30 01:38:53 UTC (rev 2018)
+++ branches/invitation_throttling/app/controllers/networks_controller.rb	2008-11-30 13:40:17 UTC (rev 2019)
@@ -163,9 +163,9 @@
       # now display message based on number of valid / invalid addresses..
       error_occurred = true # a flag to select where to redirect from this action
       respond_to do |format|
-        if validated_addr_count == 0 && existing_invitation_emails.empty? && db_user_addresses.empty?
+        if validated_addr_count == 0 && existing_invitation_emails.empty? && db_user_addresses.empty? && overflow_addresses.empty?
           error_msg = "None of the supplied address(es) could be validated, no emails were sent. Please try again!<br/>You have supplied the following address list:<br/>\"#{params[:invitations][:address_list]}\""
-        elsif (addr_count == validated_addr_count) && (!err_addresses || err_addresses.empty?)
+        elsif (addr_count == validated_addr_count) && (!err_addresses || err_addresses.empty?) && (!overflow_addresses || overflow_addresses.empty?)
           error_msg = validated_addr_count.to_s + " Invitation email(s) sent successfully"
           error_occurred = false
         else 

Modified: branches/invitation_throttling/app/controllers/users_controller.rb (2018 => 2019)


--- branches/invitation_throttling/app/controllers/users_controller.rb	2008-11-30 01:38:53 UTC (rev 2018)
+++ branches/invitation_throttling/app/controllers/users_controller.rb	2008-11-30 13:40:17 UTC (rev 2019)
@@ -474,10 +474,10 @@
       # in future, potentially there's going to be a way to get results of sending;
       # now display message based on number of valid / invalid addresses..
       respond_to do |format|
-        if validated_addr_count == 0 && existing_invitation_emails.empty? && db_user_addresses.empty?
+        if validated_addr_count == 0 && existing_invitation_emails.empty? && db_user_addresses.empty? && overflow_addresses.empty?
           flash.now[:notice] = "None of the supplied address(es) could be validated, no emails were sent.<br/>Please check your input!"
           format.html { render :action ="" 'invite' }
-        elsif (addr_count == validated_addr_count) && (!err_addresses || err_addresses.empty?)
+        elsif (addr_count == validated_addr_count) && (!err_addresses || err_addresses.empty?) && (!overflow_addresses || overflow_addresses.empty?)
           flash[:notice] = validated_addr_count.to_s + " Invitation email(s) sent successfully"
           format.html { redirect_to :action ="" 'show', :id => params[:invitations_user_id] }
         else

reply via email to

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