X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/62e7006a2131eef9f7569e8c25207b3777bc3d74..9b8e28f24b467a174a9699f3f4c95fc832184497:/app/controllers/trace_controller.rb diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index ea107c2b5..f8ce29aba 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -27,7 +27,7 @@ class TraceController < ApplicationController # from display name, pick up user id if one user's traces only display_name = params[:display_name] if target_user.nil? and !display_name.blank? - target_user = User.find(:first, :conditions => [ "visible = ? and display_name = ?", true, display_name]) + target_user = User.find(:first, :conditions => { :status => ["active", "confirmed"], :display_name => display_name }) if target_user.nil? @title = t'trace.no_such_user.title' @not_found_user = display_name @@ -233,7 +233,7 @@ class TraceController < ApplicationController rss = OSM::GeoRSS.new traces.each do |trace| - rss.add(trace.latitude, trace.longitude, trace.name, trace.user.display_name, url_for({:controller => 'trace', :action => 'view', :id => trace.id, :display_name => trace.user.display_name}), " 'icon', :id => trace.id, :user_login => trace.user.display_name})}'> GPX file with #{trace.size} points from #{trace.user.display_name}", trace.timestamp) + rss.add(trace.latitude, trace.longitude, trace.name, trace.user.display_name, url_for({:controller => 'trace', :action => 'view', :id => trace.id, :display_name => trace.user.display_name}), " 'icon', :id => trace.id, :display_name => trace.user.display_name})}'> GPX file with #{trace.size} points from #{trace.user.display_name}", trace.timestamp) end render :text => rss.to_s, :content_type => "application/rss+xml"