X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/5a2ffa227c99a271366735fa43a02ef93b99a673..f30dcd1a629449c19bc75fb3e6baa2a58f57d3c5:/app/controllers/trace_controller.rb?ds=sidebyside diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index d82308baa..abd59aeb2 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -15,8 +15,7 @@ class TraceController < ApplicationController before_filter :offline_redirect, :only => [:create, :edit, :delete, :data, :api_data, :api_create] around_filter :api_call_handle_error, :only => [:api_details, :api_data, :api_create] - caches_action :list, :unless => :logged_in?, :layout => false - caches_action :view, :layout => false + caches_action :list, :view, :layout => false caches_action :georss, :layout => true 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 @@ -143,6 +142,10 @@ class TraceController < ApplicationController logger.info("id is #{@trace.id}") flash[:notice] = t 'trace.create.trace_uploaded' + if @user.traces.count(:conditions => { :inserted => false }) > 4 + flash[:warning] = t 'trace.trace_header.traces_waiting', :count => @user.traces.count(:conditions => { :inserted => false }) + end + redirect_to :action => 'mine' end else