Skip to content

Commit

Permalink
Yet more tests...
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Mar 2, 2015
1 parent dfc85f0 commit 15b5501
Show file tree
Hide file tree
Showing 9 changed files with 519 additions and 199 deletions.
6 changes: 0 additions & 6 deletions app/controllers/diary_entry_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,6 @@ def require_administrator
end
end

##
# is this list user specific?
def user_specific_list?
params[:friends] || params[:nearby]
end

##
# decide on a location for the diary entry map
def set_map_location
Expand Down
20 changes: 13 additions & 7 deletions app/controllers/user_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def confirm_resend
Notifier.signup_confirm(user, user.tokens.create).deliver_now
flash[:notice] = t "user.confirm_resend.success", :email => user.email
else
flash[:notice] = t "user.confirm_resend.failure", :name => params[:display_name]
flash[:error] = t "user.confirm_resend.failure", :name => params[:display_name]
end

redirect_to :action => "login"
Expand All @@ -351,26 +351,32 @@ def confirm_email
token.destroy
session[:user] = @user.id
redirect_to :action => "account", :display_name => @user.display_name
else
elsif token
flash[:error] = t "user.confirm_email.failure"
redirect_to :action => "account", :display_name => @user.display_name
redirect_to :action => "account", :display_name => token.user.display_name
else
flash[:error] = t "user.confirm_email.unknown_token"
end
end
end

def api_read
render :text => "", :status => :gone unless @this_user.visible?
if @this_user.visible?
render :action => :api_read, :content_type => "text/xml"
else
render :text => "", :status => :gone
end
end

def api_details
@this_user = @user
render :action => :api_read
render :action => :api_read, :content_type => "text/xml"
end

def api_gpx_files
doc = OSM::API.new.get_xml_doc
@user.traces.each do |trace|
doc.root << trace.to_xml_node if trace.public? || trace.user == @user
@user.traces.reload.each do |trace|
doc.root << trace.to_xml_node
end
render :text => doc.to_s, :content_type => "text/xml"
end
Expand Down
4 changes: 3 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1897,6 +1897,7 @@ en:
Confirm your account by clicking on the link in the email and you'll be able to start mapping.
press confirm button: "Press the confirm button below to activate your account."
button: Confirm
success: "Confirmed your account, thanks for signing up!"
already active: "This account has already been confirmed."
unknown token: "That confirmation code has expired or does not exist."
reconfirm_html: "If you need us to resend the confirmation email, <a href=\"%{reconfirm}\">click here</a>."
Expand All @@ -1907,8 +1908,9 @@ en:
heading: Confirm a change of email address
press confirm button: "Press the confirm button below to confirm your new email address."
button: Confirm
success: "Confirmed your email address, thanks for signing up!"
success: "Confirmed your change of email address!"
failure: "An email address has already been confirmed with this token."
unknown_token: "That confirmation code has expired or does not exist."
set_home:
flash success: "Home location saved successfully"
go_public:
Expand Down
Loading

0 comments on commit 15b5501

Please sign in to comment.