before_filter :offline_redirect, :only => [:create, :edit, :delete, :data, :api_create, :api_delete, :api_data]
around_filter :api_call_handle_error, :only => [:api_create, :api_read, :api_update, :api_delete, :api_data]
before_filter :offline_redirect, :only => [:create, :edit, :delete, :data, :api_create, :api_delete, :api_data]
around_filter :api_call_handle_error, :only => [:api_create, :api_read, :api_update, :api_delete, :api_data]
- caches_action :list, :unless => :logged_in?, :layout => false
- caches_action :view, :layout => false
+# 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, :api_update, :api_delete]
cache_sweeper :tracetag_sweeper, :only => [:create, :edit, :delete, :api_create, :api_update, :api_delete]
caches_action :georss, :layout => true
cache_sweeper :trace_sweeper, :only => [:create, :edit, :delete, :api_create, :api_update, :api_delete]
cache_sweeper :tracetag_sweeper, :only => [:create, :edit, :delete, :api_create, :api_update, :api_delete]
- @title = t'trace.no_such_user.title'
- @not_found_user = display_name
- render :action => 'no_such_user', :status => :not_found
+ render_unknown_user display_name
trace.visible = false
trace.save
flash[:notice] = t 'trace.delete.scheduled_for_deletion'
redirect_to :action => :list, :display_name => @user.display_name
else
trace.visible = false
trace.save
flash[:notice] = t 'trace.delete.scheduled_for_deletion'
redirect_to :action => :list, :display_name => @user.display_name
else
- if request.post?
- tags = params[:tags] || ""
- description = params[:description] || ""
- visibility = params[:visibility]
-
- if visibility.nil?
- if params[:public] && params[:public].to_i.nonzero?
- visibility = "public"
- else
- visibility = "private"
- end
+ tags = params[:tags] || ""
+ description = params[:description] || ""
+ visibility = params[:visibility]
+
+ if visibility.nil?
+ if params[:public] && params[:public].to_i.nonzero?
+ visibility = "public"
+ else
+ visibility = "private"
- if params[:file].respond_to?(:read)
- do_create(params[:file], tags, description, visibility)
+ if params[:file].respond_to?(:read)
+ do_create(params[:file], tags, description, visibility)
- if @trace.id
- render :text => @trace.id.to_s, :content_type => "text/plain"
- elsif @trace.valid?
- render :nothing => true, :status => :internal_server_error
- else
- render :nothing => true, :status => :bad_request
- end
+ if @trace.id
+ render :text => @trace.id.to_s, :content_type => "text/plain"
+ elsif @trace.valid?
+ render :nothing => true, :status => :internal_server_error
# Create the trace object, falsely marked as already
# inserted to stop the import daemon trying to load it
# Create the trace object, falsely marked as already
# inserted to stop the import daemon trying to load it