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]
if !display_name.blank?
target_user = User.active.where(:display_name => display_name).first
if target_user.nil?
- @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
return
end
end
@trace.tagstring = params[:trace][:tagstring]
@trace.visibility = params[:trace][:visibility]
if @trace.save
- redirect_to :action => 'view'
+ redirect_to :action => 'view', :display_name => @user.display_name
end
end
else
filename = "/tmp/#{rand}"
# ...and save the uploaded file to that location
- File.open(filename, "w") { |f| f.write(file.read) }
+ File.open(filename, "wb") { |f| f.write(file.read) }
# Create the trace object, falsely marked as already
# inserted to stop the import daemon trying to load it