X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ba1ecf61f3f184bd79517fc774ead758c26d2b34..68368118a63f4d6c2bed18cdf4dce525256b3a41:/app/controllers/trace_controller.rb?ds=inline diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index 3c16b9a80..c51f54c5e 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -18,8 +18,8 @@ class TraceController < ApplicationController caches_action :list, :unless => :logged_in?, :layout => false caches_action :view, :layout => false caches_action :georss, :layout => true - cache_sweeper :trace_sweeper, :only => [:create, :edit, :delete, :api_create] - cache_sweeper :tracetag_sweeper, :only => [:create, :edit, :delete, :api_create] + cache_sweeper :trace_sweeper, :only => [:create, :edit, :delete, :api_create], :unless => OSM_STATUS == :database_offline + cache_sweeper :tracetag_sweeper, :only => [:create, :edit, :delete, :api_create], :unless => OSM_STATUS == :database_offline # Counts and selects pages of GPX traces for various criteria (by user, tags, public etc.). # target_user - if set, specifies the user to fetch traces for. if not set will fetch all traces @@ -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