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